From 121f53a20bb3e90b0f456e7eed6f4236883d065d Mon Sep 17 00:00:00 2001 From: Luke Bousfield Date: Sun, 2 Jul 2017 10:15:23 -0400 Subject: [PATCH] Replaced 'startsWith' with `RegExp.test()` --- common/app/routes/challenges/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/app/routes/challenges/utils.js b/common/app/routes/challenges/utils.js index c58dad00a0..29e65f2e36 100644 --- a/common/app/routes/challenges/utils.js +++ b/common/app/routes/challenges/utils.js @@ -90,7 +90,7 @@ function logReplacer(value) { const replaced = value.map(logReplacer); return '[' + replaced.join(', ') + ']'; } - if (typeof value === 'string' && !value.startsWith('//')) { + if (typeof value === 'string' && !(/^\/\//).test(value)) { return '"' + value + '"'; } if (typeof value === 'number' && isNaN(value)) {