File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
lib/node_modules/@stdlib/repl/lib Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ function tokenizer( line, context ) {
270
270
function resolveMemberExpression ( node , compute ) {
271
271
var properties = linkedList ( ) ;
272
272
var property ;
273
+ var computed ;
273
274
var locals ;
274
275
var obj ;
275
276
@@ -350,7 +351,12 @@ function tokenizer( line, context ) {
350
351
}
351
352
// Case: `foo[a.b].bar` - recursively compute the internal `MemberExpression`...
352
353
if ( property . value . type === 'MemberExpression' ) {
353
- obj = obj [ resolveMemberExpression ( property . value , true ) ] ;
354
+ computed = resolveMemberExpression ( property . value , true ) ;
355
+ if ( ! isLiteralType ( typeof computed ) ) {
356
+ // Couldn't compute the internal `MemberExpression` into a definite name:
357
+ break ;
358
+ }
359
+ obj = obj [ computed ] ;
354
360
if ( ! obj ) {
355
361
// Property not found in context:
356
362
break ;
You can’t perform that action at this time.
0 commit comments