@sigx/terminal 0.1.13 → 0.1.15
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/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1037,6 +1037,17 @@ function lazy(loader) {
|
|
|
1037
1037
|
loadState.tick++;
|
|
1038
1038
|
throw error;
|
|
1039
1039
|
});
|
|
1040
|
+
else if (state === "pending") promise.then(() => {
|
|
1041
|
+
if (loadState.state === "pending") {
|
|
1042
|
+
loadState.state = "resolved";
|
|
1043
|
+
loadState.tick++;
|
|
1044
|
+
}
|
|
1045
|
+
}).catch(() => {
|
|
1046
|
+
if (loadState.state === "pending") {
|
|
1047
|
+
loadState.state = "rejected";
|
|
1048
|
+
loadState.tick++;
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1040
1051
|
if (state === "resolved" && Component) return () => {
|
|
1041
1052
|
return jsx(Component, {});
|
|
1042
1053
|
};
|