Skip to content

Commit 85b201b

Browse files
add remaining segments check
1 parent ddfd8b6 commit 85b201b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/repl.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,10 @@ function includesProxiesOrGetters(exprSegments, evalFn, context, callback, curre
16561656
return callback(true);
16571657
}
16581658

1659+
if (remainingSegments.length === 0) {
1660+
return callback(false);
1661+
}
1662+
16591663
const nextSegmentProp = ObjectGetOwnPropertyDescriptor(currentObj, remainingSegments[0]);
16601664
const nextSegmentPropHasGetter = typeof nextSegmentProp?.get === 'function';
16611665
if (nextSegmentPropHasGetter) {

0 commit comments

Comments
 (0)