@manyducks.co/dolla 0.77.2 → 0.78.0

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/lib/index.js CHANGED
@@ -518,11 +518,10 @@ function computed(...args) {
518
518
  if (computedStopCallback) {
519
519
  computedStopCallback();
520
520
  }
521
- latestComputedValue = computedValue;
522
521
  computedStopCallback = computedValue[OBSERVE]((current) => {
523
522
  latestComputedValue = current;
524
523
  for (const callback of observers) {
525
- callback(computedValue);
524
+ callback(current);
526
525
  }
527
526
  });
528
527
  } else if (!deepEqual(computedValue, latestComputedValue)) {
@@ -572,16 +571,10 @@ function computed(...args) {
572
571
  }
573
572
  return {
574
573
  get: () => {
575
- let computed2;
576
574
  if (isObserving) {
577
- computed2 = latestComputedValue;
578
- } else {
579
- computed2 = compute(...readables.map((x) => x.get()));
580
- }
581
- if (isReadable(computed2)) {
582
- return computed2.get();
575
+ return latestComputedValue;
583
576
  } else {
584
- return computed2;
577
+ return compute(...readables.map((x) => x.get()));
585
578
  }
586
579
  },
587
580
  [OBSERVE]: (callback) => {