Skip to content

Commit

Permalink
prevent .indexOf() calls on integers
Browse files Browse the repository at this point in the history
  • Loading branch information
finn-vgtl authored Jun 21, 2022
1 parent 7c9a5ce commit d7623e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/redot-stringify/redot-stringify.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

function utilQuotesAndEscaping(text) {
if (text.indexOf(" ") > 0) {
if (text.toString().indexOf(" ") > 0) {
return '"' + text.replace('"', '\\"') + '"';
}

Expand Down

0 comments on commit d7623e0

Please sign in to comment.