Skip to content

Commit f38e4e8

Browse files
lib: fix an off by one error
Co-authored-by: Ruben Bridgewater <[email protected]>
1 parent a5fc528 commit f38e4e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/util/inspect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ function getPrefix(constructor, tag, fallback, size = '') {
10391039
} else {
10401040
const endPos = position + tag.length;
10411041
if (endPos !== constructor.length &&
1042-
constructor[endPos + 1] === constructor[endPos + 1].toLowerCase()) {
1042+
constructor[endPos] === constructor[endPos].toLowerCase()) {
10431043
result += `[${tag}] `;
10441044
}
10451045
}

0 commit comments

Comments
 (0)