Skip to content

Commit

Permalink
[added] Version 2.0.8 🙌 - Indexing __id no more returns a signal.
Browse files Browse the repository at this point in the history
  • Loading branch information
michTheBrandofficial committed Dec 17, 2023
1 parent b8cf1af commit 97e1956
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nixix",
"version": "2.0.7",
"version": "2.0.8",
"description": "NixixJS is a lightweight JavaScript Library used for building reactive User Interfaces.",
"main": "./dom/index.ts",
"module": "./dom/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion primitives/Store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function createStoreProxy(obj: object | any[]) {
let jsx = nixixStore.jsx
const val = target[p];
let returnedValue: any = null;
if (!isPrimitive(val)) returnedValue = val;
if (!isPrimitive(val) || (p === '$$__id')) returnedValue = val;
else {
let signalMap = this.signalMap;
if (jsx) {
Expand Down
6 changes: 3 additions & 3 deletions primitives/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ function callStore<S>(
nixixStore["$$__lastReactionProvider"] = "store";
nixixStore.Store === undefined && (nixixStore.Store = {});
const { Store: SStore } = nixixStore as Required<typeof nixixStore>
let value: Array<any> | object = isFunction(initialValue)
let value: Array<any> | object = cloneObject(isFunction(initialValue)
? (initialValue as Function)()
: initialValue;

: initialValue );
SStore[`_${storeId}_`] = { value: value };
let initValue = new Store({ value: value, id: storeId });

Expand Down

0 comments on commit 97e1956

Please sign in to comment.