fix: don't return bad promise
This commit is contained in:
parent
048cc91fbf
commit
d27d382add
|
@ -61,7 +61,8 @@ function compileExpression(expression) {
|
||||||
if (!isLastOp || !assign) {
|
if (!isLastOp || !assign) {
|
||||||
if ('undefined' === typeof current) {
|
if ('undefined' === typeof current) {
|
||||||
const rendered = render(rawOps.slice(0, index + 2));
|
const rendered = render(rawOps.slice(0, index + 2));
|
||||||
next = Promise.reject(new Error(`'${rendered}' is undefined`));
|
// next = Promise.reject(new Error(`'${rendered}' is undefined`));
|
||||||
|
next = undefined;
|
||||||
shorted = true;
|
shorted = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -79,7 +80,8 @@ function compileExpression(expression) {
|
||||||
break;
|
break;
|
||||||
case 'invoke':
|
case 'invoke':
|
||||||
const rendered = render(rawOps.slice(0, index + 2));
|
const rendered = render(rawOps.slice(0, index + 2));
|
||||||
next = Promise.reject(new Error(`invalid assignment to function '${rendered}'`));
|
// next = Promise.reject(new Error(`invalid assignment to function '${rendered}'`));
|
||||||
|
next = undefined;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user