Skip to content

Commit 57a5407

Browse files
committed
fix crash on empty variable input
1 parent 682807c commit 57a5407

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/compiler/jsexecute.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ runtimeFunctions.parseJSONSafe = `const parseJSONSafe = json => {
614614
}`;
615615

616616
runtimeFunctions._resolveKeyPath = `const _resolveKeyPath = (obj, keyPath) => {
617+
if (!keyPath) return [obj, keyPath];
617618
const path = keyPath.matchAll(/(\\.|^)(?<key>[^.[]+)|\\[(?<litkey>(\\\\\\]|\\\\|[^]])+)\\]/g);
618619
let top = obj;
619620
let pre;

0 commit comments

Comments
 (0)