From 0c280207fbf8c3b33cf0486afea6a3324e42c7dc Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 29 Oct 2015 15:18:16 +0000 Subject: [PATCH] cleanup --- node_modules/c9/json-with-re.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node_modules/c9/json-with-re.js b/node_modules/c9/json-with-re.js index 0f748bc1..e8f475db 100644 --- a/node_modules/c9/json-with-re.js +++ b/node_modules/c9/json-with-re.js @@ -11,9 +11,9 @@ exports.replacer = function(key, value) { }; exports.reviver = function(key, value) { - if ((value || "").toString().indexOf("__REGEXP ") == 0) { - var m = value.split("__REGEXP ")[1].match(/\/(.*)\/(.*)?/); - return new RegExp(m[1], m[2] || ""); + if ((value + "").indexOf("__REGEXP ") == 0) { + var m = value.match(/__REGEXP \/(.*)\/(.*)?/); + return new RegExp(m[1], m[2]); } else return value;