Skip to content

Commit 53db5f6

Browse files
committed
move accessor inside try-catch
1 parent 570cf5d commit 53db5f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/easycoder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3050,10 +3050,10 @@ const EasyCoder_Core = {
30503050
} else if ([`{`, `]`].includes(propertyContent.charAt(0))) {
30513051
try {
30523052
content = JSON.parse(propertyContent);
3053+
content = content[property];
30533054
} catch (err) {
30543055
program.runtimeError(program[program.pc].lino, `Can't parse '${propertyContent}': ${err.message}`);
30553056
}
3056-
content = content[property];
30573057
if (content == undefined) {
30583058
content = ``;
30593059
}

js/easycoder/Core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3050,10 +3050,10 @@ const EasyCoder_Core = {
30503050
} else if ([`{`, `]`].includes(propertyContent.charAt(0))) {
30513051
try {
30523052
content = JSON.parse(propertyContent);
3053+
content = content[property];
30533054
} catch (err) {
30543055
program.runtimeError(program[program.pc].lino, `Can't parse '${propertyContent}': ${err.message}`);
30553056
}
3056-
content = content[property];
30573057
if (content == undefined) {
30583058
content = ``;
30593059
}

0 commit comments

Comments
 (0)