fix corner case in `strip_func_ids()` (#3090)
authorAlex Lam S.L <alexlamsl@gmail.com>
Wed, 18 Apr 2018 20:51:42 +0000 (04:51 +0800)
committerGitHub <noreply@github.com>
Wed, 18 Apr 2018 20:51:42 +0000 (04:51 +0800)
test/sandbox.js

index 13cfe08..426ac1f 100644 (file)
@@ -40,7 +40,7 @@ function safe_log(arg, level) {
 }
 
 function strip_func_ids(text) {
-    return text.toString().replace(/F[0-9]{6}N/g, "<F<>N>");
+    return ("" + text).replace(/F[0-9]{6}N/g, "<F<>N>");
 }
 
 var context;