native-document 1.0.245 → 1.0.246

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": "native-document",
3
- "version": "1.0.245",
3
+ "version": "1.0.246",
4
4
  "description": "A reactive JavaScript framework that preserves native DOM simplicity without sacrificing modern features",
5
5
  "author": "AfroCodeur <https://github.com/afrocodeur>",
6
6
  "license": "MIT",
@@ -539,4 +539,12 @@ ObservableArray.prototype.fnClear = function () {
539
539
  return () => this.clear();
540
540
  };
541
541
 
542
+ ObservableArray.prototype.val = function () {
543
+ const result = [];
544
+ for(const element of this.$currentValue) {
545
+ result.push(element?.__$Observable ? element.val() : element);
546
+ }
547
+ return result;
548
+ };
549
+
542
550
  export default ObservableArray;
@@ -70,7 +70,7 @@ export const StoreFactory = function() {
70
70
  from.subscribe((data, _, operations) => {
71
71
  const callback = methods[operations.action];
72
72
  if(!callback) {
73
- originalSet(data);
73
+ originalSet([...data]);
74
74
  return;
75
75
  }
76
76
  callback(...(operations.args||[]));