From aac7254879150b42cd2202f8de5f8051ee377af5 Mon Sep 17 00:00:00 2001 From: timothyjoel <43569614+timothyjoel@users.noreply.github.com> Date: Fri, 20 Aug 2021 12:09:23 +0200 Subject: [PATCH] fix transformer.js normalized value --- core/Transformer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Transformer.js b/core/Transformer.js index 1ae5722a..a84dab7e 100644 --- a/core/Transformer.js +++ b/core/Transformer.js @@ -5,7 +5,7 @@ const iOSTransformer = { return "// " + comment; }, transformKeyValue: function(key, value) { - let normalizedValue = value.replace(/%newline%/gi, "\\n") + let normalizedValue = value.toString().replace(/%newline%/gi, "\\n"); normalizedValue = normalizedValue.replace(/"/gi, '\\"') normalizedValue = normalizedValue.replace(/%([@df])/gi, '%$1') normalizedValue = normalizedValue.replace(/%s/gi, "%@") @@ -32,7 +32,7 @@ const androidTransformer = { return ""; }, transformKeyValue: function(key, value) { - let normalizedValue = value.replace(/%newline%/gi, "\\n"); + let normalizedValue = value.toString().replace(/%newline%/gi, "\\n"); normalizedValue = normalizedValue.replace(/'/gi, "\\'"); normalizedValue = normalizedValue.replace(/%([sdf])/gi, '%#$$$1'); normalizedValue = normalizedValue.replace(/&/gi, "&");