tpl 的 warn 里显示代码,方便追查 (#1043)

This commit is contained in:
吴多益 2020-11-08 23:14:20 +08:00 committed by GitHub
parent dba3da3482
commit d3dd538ae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ export function evalExpression(expression: string, data?: object): boolean {
data = data || {};
return fn.call(data, data, getFilters());
} catch (e) {
console.warn(e);
console.warn(expression, e);
return false;
}
}
@ -107,7 +107,7 @@ export function evalJS(js: string, data: object): any {
data = data || {};
return fn.call(data, data, getFilters());
} catch (e) {
console.warn(e);
console.warn(js, e);
return null;
}
}