@nxtedition/lib 14.3.3 → 14.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/util/template/javascript.js +11 -4
package/package.json
CHANGED
|
@@ -539,16 +539,23 @@ module.exports = ({ ds, proxify, compiler }) => {
|
|
|
539
539
|
}
|
|
540
540
|
`)
|
|
541
541
|
} catch (err) {
|
|
542
|
-
|
|
542
|
+
return () =>
|
|
543
|
+
rxjs.throwError(
|
|
544
|
+
Object.assign(new Error(`failed to parse expression ${expression}`), { cause: err }),
|
|
545
|
+
)
|
|
543
546
|
}
|
|
544
547
|
|
|
545
548
|
const context = vm.createContext({ ...globals })
|
|
546
549
|
|
|
547
550
|
return (args) =>
|
|
548
551
|
new rxjs.Observable((o) => {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
+
try {
|
|
553
|
+
const exp = new Expression(context, script, expression, args, o)
|
|
554
|
+
return () => {
|
|
555
|
+
exp._destroy()
|
|
556
|
+
}
|
|
557
|
+
} catch (err) {
|
|
558
|
+
o.error(err)
|
|
552
559
|
}
|
|
553
560
|
})
|
|
554
561
|
})
|