We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f442c3 commit 750ea7cCopy full SHA for 750ea7c
src/index.js
@@ -63,8 +63,13 @@ let deleteMarker = {};
63
let operators = {};
64
65
operators.$eval = (template, context) => {
66
- let value = render(template['$eval'], context);
67
- return interpreter.parse(value, context);
+ checkUndefinedProperties(template, ['\\$eval']);
+
68
+ if (!isString(template['$eval'])) {
69
+ throw new TemplateError('$eval must be given a string expression');
70
+ }
71
72
+ return interpreter.parse(template['$eval'], context);
73
};
74
75
operators.$flatten = (template, context) => {
0 commit comments