Skip to content

Commit

Permalink
fix tracking bug when set another reactive object by loadData
Browse files Browse the repository at this point in the history
  • Loading branch information
rudnik275 committed Mar 22, 2024
1 parent 073398c commit 7704eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tracked-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export function useTrackedInstance<Data>(
const changedData = computed(() => _changedData.value.root as DeepPartial<Data>)

const loadData = (newData: Data) => {
_data.value = {root: newData} as InternalData
_data.value = {root: cloneDeep(newData)} as InternalData
_originalData.value = {}
}

Expand Down

0 comments on commit 7704eb9

Please sign in to comment.