Skip to content

Commit aca0880

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

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
@@ -788,7 +788,7 @@ function getPrefix(constructor, tag, fallback, size = '') {
788788
} else {
789789
const endPos = position + tag.length;
790790
if (endPos !== constructor.length &&
791-
constructor[endPos + 1] === constructor[endPos + 1].toLowerCase()) {
791+
constructor[endPos] === constructor[endPos].toLowerCase()) {
792792
result += `[${tag}] `;
793793
}
794794
}

0 commit comments

Comments
 (0)