From d7623e0dd8a10081fcb31b763931289ffe5b8339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Finn=20Voigtl=C3=A4nder?= <26481642+finn-vgtl@users.noreply.github.com> Date: Tue, 21 Jun 2022 09:47:27 +0200 Subject: [PATCH] prevent .indexOf() calls on integers --- packages/redot-stringify/redot-stringify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/redot-stringify/redot-stringify.js b/packages/redot-stringify/redot-stringify.js index 8bb837f..b48eba8 100644 --- a/packages/redot-stringify/redot-stringify.js +++ b/packages/redot-stringify/redot-stringify.js @@ -1,7 +1,7 @@ "use strict"; function utilQuotesAndEscaping(text) { - if (text.indexOf(" ") > 0) { + if (text.toString().indexOf(" ") > 0) { return '"' + text.replace('"', '\\"') + '"'; }