@ngstato/core 0.4.0 → 0.4.1

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 CHANGED
@@ -585,7 +585,7 @@ function fromStream(setupFn, updateFn, options) {
585
585
  // src/helpers/optimistic.ts
586
586
  function optimistic(immediate, confirm) {
587
587
  return async (state, ...args) => {
588
- const snapshot = structuredClone(state);
588
+ const snapshot = JSON.parse(JSON.stringify(state));
589
589
  immediate(state, ...args);
590
590
  try {
591
591
  await confirm(state, ...args);