Skip to content

Commit 953697a

Browse files
kiyomizumiaBridgeAR
authored andcommitted
util: deleted unreachable code from util.inspect
PR-URL: #24187 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 7fc9107 commit 953697a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/internal/util/inspect.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,8 @@ function strEscape(str) {
297297
last = i + 1;
298298
}
299299
}
300-
if (last === 0) {
301-
result = str;
302-
} else if (last !== i) {
300+
301+
if (last !== i) {
303302
result += str.slice(last);
304303
}
305304
return addQuotes(result, singleQuote);

0 commit comments

Comments
 (0)