Skip to content

Commit 032745d

Browse files
committed
fixed bug when mapping names in expressions
1 parent 9731dec commit 032745d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

debugger/debugger.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export namespace Debugger {
308308

309309
function mapName(sourceName: string, isProperty: boolean) {
310310
if (isProperty) {
311-
if (isValidIdentifier(sourceName)) {
311+
if (!isValidIdentifier(sourceName)) {
312312
return `["${sourceName}"]`;
313313
} else {
314314
return `.${sourceName}`;
@@ -335,6 +335,7 @@ export namespace Debugger {
335335
isEscaped = false;
336336
}
337337
} else if (char === '"' || char === "'") {
338+
//TODO: Handle bracket string types ([[foo]], [=[bar]=], etc...)
338339
inQuote = char;
339340
} else {
340341
const [nameChar] = char.match("[^\"'`~!@#%%^&*%(%)%-+=%[%]{}|\\/<>,%.:;%s]");

0 commit comments

Comments
 (0)