Skip to content

Commit

Permalink
fix(reactive-vue): fix the exception of multiple update nodes in vue3…
Browse files Browse the repository at this point in the history
… case (#2966)
  • Loading branch information
ethesky-rcplatformhk committed Mar 20, 2022
1 parent 631385d commit b1faf4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions lerna.json
Expand Up @@ -2,9 +2,7 @@
"version": "2.0.15",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": [
"--ignore-engines"
],
"npmClientArgs": ["--ignore-engines"],
"command": {
"version": {
"forcePublish": true,
Expand Down
10 changes: 5 additions & 5 deletions packages/reactive-vue/src/hooks/useObserver.ts
Expand Up @@ -33,13 +33,13 @@ export const useObserver = (options?: IObserverOptions) => {
}
})
}
let runUpdate = () => {

const update = function () {
let refn = null
tracker?.track(() => {
vm['_updateEffectRun'].call(newValue)
refn = vm['_updateEffectRun'].call(newValue)
})
}
const update = function () {
nextTick(runUpdate)
return refn
}
newTracker()
newValue.run = update
Expand Down

0 comments on commit b1faf4d

Please sign in to comment.