Skip to content

Commit e9758f5

Browse files
authored
Merge pull request #10 from formio/FIO-9942-protected-eval-for-render5.x
FIO-9942: assign result value from evaluated function
2 parents fc9ed63 + 3143664 commit e9758f5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ProtectedEvaluator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Evaluator: IEvaluator = {
2929
return baseEvaluate(func, args, ...rest);
3030
}
3131

32-
func = `result = (function() {${func}})()`;
32+
func = `result = (function() { value = ${func}; return value; })()`;
3333
const initFunc = function(interpreter, globalObject) {
3434
Object.keys(args).forEach((variable) => {
3535
// Exclude variables which have circular references

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ module.exports = {
2424
}
2525
},
2626
externals: {
27-
formiojs: 'Formio',
27+
'@formio/js': 'Formio',
2828
},
2929
};

0 commit comments

Comments
 (0)