@nxtedition/lib 17.2.8 → 17.2.9
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
|
@@ -564,16 +564,23 @@ export default function ({ ds, proxify, compiler }) {
|
|
|
564
564
|
}
|
|
565
565
|
`)
|
|
566
566
|
} catch (err) {
|
|
567
|
-
|
|
567
|
+
return () =>
|
|
568
|
+
rxjs.throwError(
|
|
569
|
+
Object.assign(new Error(`failed to parse expression ${expression}`), { cause: err }),
|
|
570
|
+
)
|
|
568
571
|
}
|
|
569
572
|
|
|
570
573
|
const context = vm.createContext({ ...globals })
|
|
571
574
|
|
|
572
575
|
return (args) =>
|
|
573
576
|
new rxjs.Observable((o) => {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
+
try {
|
|
578
|
+
const exp = new Expression(context, script, expression, args, o)
|
|
579
|
+
return () => {
|
|
580
|
+
exp._destroy()
|
|
581
|
+
}
|
|
582
|
+
} catch (err) {
|
|
583
|
+
o.error(err)
|
|
577
584
|
}
|
|
578
585
|
})
|
|
579
586
|
})
|