@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.
@@ -2092,7 +2092,7 @@ function subscribeToValtio($$state, statePath, node) {
2092
2092
  }
2093
2093
  }
2094
2094
  function initializeStateValue($$state, initialStateCell, proxyRoot) {
2095
- var _a, _b, _c;
2095
+ var _a;
2096
2096
  var initialStateName = initialStateCell.node.getSpec().path;
2097
2097
  var stateAccess = new Set();
2098
2098
  $$state.stateInitializationEnv.visited.add(initialStateName);
@@ -2149,16 +2149,12 @@ function initializeStateValue($$state, initialStateCell, proxyRoot) {
2149
2149
  : clonedValue;
2150
2150
  set(proxyRoot, initialStateCell.path, value);
2151
2151
  }
2152
- catch (_d) {
2152
+ catch (_b) {
2153
2153
  // Setting the state to undefined to make sure it gets re-initialized
2154
2154
  // in case it changes values.
2155
2155
  initialStateCell.initialValue = undefined;
2156
2156
  set(proxyRoot, initialStateCell.path, undefined);
2157
2157
  }
2158
- //immediately fire onChange
2159
- if (initialSpec.onChangeProp) {
2160
- (_c = (_b = $$state.env.$props)[initialSpec.onChangeProp]) === null || _c === void 0 ? void 0 : _c.call(_b, initialValue);
2161
- }
2162
2158
  $$state.stateInitializationEnv.visited.delete(initialStateName);
2163
2159
  $$state.stateInitializationEnv.stack.pop();
2164
2160
  return initialValue;
@@ -2499,7 +2495,9 @@ function useDollarState(specs) {
2499
2495
  var spec = node.getSpec();
2500
2496
  if (!spec.isRepeated && spec.type !== "private" && spec.initFunc) {
2501
2497
  var stateCell = getStateCellFrom$StateRoot($state, spec.pathObj);
2502
- initializeStateValue($$state, stateCell, $state);
2498
+ if (stateCell.initialValue === UNINITIALIZED) {
2499
+ initializeStateValue($$state, stateCell, $state);
2500
+ }
2503
2501
  }
2504
2502
  });
2505
2503
  }, []);