@plasmicapp/react-web 0.2.357 → 0.2.358

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/react-web",
3
- "version": "0.2.357",
3
+ "version": "0.2.358",
4
4
  "description": "plasmic library for rendering in the presentational style",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
@@ -168,5 +168,5 @@
168
168
  "react": ">=16.8.0",
169
169
  "react-dom": ">=16.8.0"
170
170
  },
171
- "gitHead": "879304149b902b453a47fe674997fcad01ae4af8"
171
+ "gitHead": "90562f44f158b15245f72926fd82658a41d0bba2"
172
172
  }
@@ -1018,7 +1018,7 @@ function subscribeToValtio($$state, statePath, node) {
1018
1018
  }
1019
1019
  }
1020
1020
  function initializeStateValue($$state, initialStateCell, proxyRoot) {
1021
- var _a, _b, _c;
1021
+ var _a;
1022
1022
  var initialStateName = initialStateCell.node.getSpec().path;
1023
1023
  var stateAccess = new Set();
1024
1024
  $$state.stateInitializationEnv.visited.add(initialStateName);
@@ -1075,16 +1075,12 @@ function initializeStateValue($$state, initialStateCell, proxyRoot) {
1075
1075
  : clonedValue;
1076
1076
  set(proxyRoot, initialStateCell.path, value);
1077
1077
  }
1078
- catch (_d) {
1078
+ catch (_b) {
1079
1079
  // Setting the state to undefined to make sure it gets re-initialized
1080
1080
  // in case it changes values.
1081
1081
  initialStateCell.initialValue = undefined;
1082
1082
  set(proxyRoot, initialStateCell.path, undefined);
1083
1083
  }
1084
- //immediately fire onChange
1085
- if (initialSpec.onChangeProp) {
1086
- (_c = (_b = $$state.env.$props)[initialSpec.onChangeProp]) === null || _c === void 0 ? void 0 : _c.call(_b, initialValue);
1087
- }
1088
1084
  $$state.stateInitializationEnv.visited.delete(initialStateName);
1089
1085
  $$state.stateInitializationEnv.stack.pop();
1090
1086
  return initialValue;
@@ -1425,7 +1421,9 @@ function useDollarState(specs) {
1425
1421
  var spec = node.getSpec();
1426
1422
  if (!spec.isRepeated && spec.type !== "private" && spec.initFunc) {
1427
1423
  var stateCell = getStateCellFrom$StateRoot($state, spec.pathObj);
1428
- initializeStateValue($$state, stateCell, $state);
1424
+ if (stateCell.initialValue === UNINITIALIZED) {
1425
+ initializeStateValue($$state, stateCell, $state);
1426
+ }
1429
1427
  }
1430
1428
  });
1431
1429
  }, []);