From 4faa89bac6b419ff573f4437a781b20f63ceec55 Mon Sep 17 00:00:00 2001 From: kiyomizumia Date: Tue, 6 Nov 2018 16:57:19 +0000 Subject: [PATCH] util: deleted unreachable code from util.inspect --- lib/internal/util/inspect.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index 4cff372b330ec1..312308b86f290b 100644 --- a/lib/internal/util/inspect.js +++ b/lib/internal/util/inspect.js @@ -297,9 +297,8 @@ function strEscape(str) { last = i + 1; } } - if (last === 0) { - result = str; - } else if (last !== i) { + + if (last !== i) { result += str.slice(last); } return addQuotes(result, singleQuote);