@adbl/cells 0.0.6 → 0.0.8

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.
@@ -176,7 +176,7 @@ export class Cell {
176
176
  */
177
177
  get derivedCells() {
178
178
  // @ts-ignore
179
- return this.#derivedCells.map((cell) => cell.deref()).filter(Boolean);
179
+ return this.#derivedCells.map((cell) => cell[0].deref()).filter(Boolean);
180
180
  }
181
181
 
182
182
  /**
@@ -413,7 +413,10 @@ export class Cell {
413
413
  []
414
414
  );
415
415
  } else {
416
- computedCell.setValue(computedFn());
416
+ const newValue = computedFn();
417
+ const isSameValue = deepEqual(computedCell.value, newValue);
418
+ computedCell.setValue(newValue);
419
+ if (isSameValue) continue;
417
420
  }
418
421
  computedCell.update();
419
422
  }
@@ -587,9 +590,11 @@ export class Cell {
587
590
  return value instanceof Cell
588
591
  ? Cell.flatten(value.wvalue)
589
592
  : Array.isArray(value)
590
- ? Cell.flattenArray(value)
593
+ ? // @ts-ignore:
594
+ Cell.flattenArray(value)
591
595
  : value instanceof Object
592
- ? Cell.flattenObject(value)
596
+ ? // @ts-ignore:
597
+ Cell.flattenObject(value)
593
598
  : value;
594
599
  };
595
600
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adbl/cells",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "A simple implementation of reactive updates for JavaScript",
5
5
  "main": "index.js",
6
6
  "private": false,