@ellx/framework
Advanced tools
Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "@ellx/framework", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Ellx full stack framework", | ||
@@ -5,0 +5,0 @@ "type": "module", |
import { autorun, batch, createAtom } from 'quarx'; | ||
import { isFlow, whenFinished } from 'conclure'; | ||
import { box } from 'quarx/box'; | ||
@@ -16,18 +15,11 @@ import { observableMap } from 'quarx/map'; | ||
if (node.source instanceof Promise) { | ||
node.source = node.source.then(() => makeInstanceReactive(url, node)); | ||
return node; | ||
} | ||
let result, error; | ||
function instantiate() { | ||
try { | ||
node.instantiate(); | ||
} | ||
catch (e) { | ||
if (isFlow(e)) { | ||
whenFinished(e, ({ cancelled }) => !cancelled && instantiate()); | ||
} | ||
set(e); | ||
} | ||
} | ||
const atom = createAtom( | ||
() => autorun(instantiate, { | ||
() => autorun(node.instantiate, { | ||
onError: set, | ||
@@ -34,0 +26,0 @@ name: `(Instantiate ${url})` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36201
1033