@sigx/terminal 0.1.16 → 0.1.17
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 +12 -8
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1027,26 +1027,30 @@ function lazy(loader) {
|
|
|
1027
1027
|
if (!promise) promise = loader().then((mod) => {
|
|
1028
1028
|
Component = "default" in mod ? mod.default : mod;
|
|
1029
1029
|
state = "resolved";
|
|
1030
|
-
|
|
1031
|
-
|
|
1030
|
+
batch(() => {
|
|
1031
|
+
loadState.state = "resolved";
|
|
1032
|
+
loadState.tick++;
|
|
1033
|
+
});
|
|
1032
1034
|
return Component;
|
|
1033
1035
|
}).catch((err) => {
|
|
1034
1036
|
error = err instanceof Error ? err : new Error(String(err));
|
|
1035
1037
|
state = "rejected";
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
+
batch(() => {
|
|
1039
|
+
loadState.state = "rejected";
|
|
1040
|
+
loadState.tick++;
|
|
1041
|
+
});
|
|
1038
1042
|
throw error;
|
|
1039
1043
|
});
|
|
1040
1044
|
else if (state === "pending") promise.then(() => {
|
|
1041
|
-
if (loadState.state === "pending") {
|
|
1045
|
+
if (loadState.state === "pending") batch(() => {
|
|
1042
1046
|
loadState.state = "resolved";
|
|
1043
1047
|
loadState.tick++;
|
|
1044
|
-
}
|
|
1048
|
+
});
|
|
1045
1049
|
}).catch(() => {
|
|
1046
|
-
if (loadState.state === "pending") {
|
|
1050
|
+
if (loadState.state === "pending") batch(() => {
|
|
1047
1051
|
loadState.state = "rejected";
|
|
1048
1052
|
loadState.tick++;
|
|
1049
|
-
}
|
|
1053
|
+
});
|
|
1050
1054
|
});
|
|
1051
1055
|
if (state === "resolved" && Component) return () => {
|
|
1052
1056
|
return jsx(Component, {});
|