wapplr 1.0.65 → 1.0.67
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/common/states.js +7 -10
- package/dist/common/styles.js +2 -2
- package/package.json +1 -1
package/dist/common/states.js
CHANGED
|
@@ -118,23 +118,22 @@ function createDefaultStateManager() {
|
|
|
118
118
|
|
|
119
119
|
var found;
|
|
120
120
|
find(keys.split("."), state);
|
|
121
|
-
return typeof found === "object" && found ? (0, _utils.copyObject)(found) : found;
|
|
121
|
+
return typeof found === "object" && found ? typeof structuredClone !== 'undefined' ? structuredClone(found) : (0, _utils.copyObject)(found) : found;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
124
|
+
if (typeof structuredClone !== 'undefined') {
|
|
125
|
+
return structuredClone(state);
|
|
126
|
+
}
|
|
128
127
|
|
|
129
|
-
|
|
128
|
+
try {
|
|
129
|
+
return JSON.parse(JSON.stringify(state));
|
|
130
130
|
} catch (e) {
|
|
131
131
|
console.log(e);
|
|
132
132
|
state = {};
|
|
133
133
|
Object.keys(initialState).forEach(function (key) {
|
|
134
134
|
state[key] = initialState[key];
|
|
135
135
|
});
|
|
136
|
-
|
|
137
|
-
return JSON.parse(cachedString);
|
|
136
|
+
return JSON.parse(JSON.stringify(state));
|
|
138
137
|
}
|
|
139
138
|
},
|
|
140
139
|
dispatch: function dispatch(action) {
|
|
@@ -144,8 +143,6 @@ function createDefaultStateManager() {
|
|
|
144
143
|
console.log(e);
|
|
145
144
|
}
|
|
146
145
|
|
|
147
|
-
cachedString = "";
|
|
148
|
-
|
|
149
146
|
try {
|
|
150
147
|
stateManager.runListeners(action);
|
|
151
148
|
} catch (e) {
|
package/dist/common/styles.js
CHANGED
|
@@ -65,7 +65,7 @@ function createDefaultStyleManager() {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
function defaultAdd(style) {
|
|
68
|
-
var cssText = style._getCss();
|
|
68
|
+
var cssText = style._getCss ? style._getCss() : '';
|
|
69
69
|
|
|
70
70
|
style._insertCss = function _insertCss() {
|
|
71
71
|
var insertCss = styleManager.insertCss;
|
|
@@ -122,7 +122,7 @@ function createDefaultStyleManager() {
|
|
|
122
122
|
WAPP = _globals$WAPP === void 0 ? "buildHash" : _globals$WAPP,
|
|
123
123
|
DEV = globals.DEV;
|
|
124
124
|
var cssText = (0, _toConsumableArray2["default"])(styleManager.css).map(function (style) {
|
|
125
|
-
return style._getCss();
|
|
125
|
+
return style._getCss ? style._getCss() : '';
|
|
126
126
|
}).join("");
|
|
127
127
|
|
|
128
128
|
if (!DEV) {
|