We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
hasChanged()
!==
1 parent 9ec8e32 commit 63a06a1Copy full SHA for 63a06a1
packages/reactivity/src/computed.ts
@@ -1,6 +1,6 @@
1
import { DebuggerOptions, ReactiveEffect } from './effect'
2
import { Ref, trackRefValue, triggerRefValue } from './ref'
3
-import { isFunction, NOOP } from '@vue/shared'
+import { hasChanged, isFunction, NOOP } from '@vue/shared'
4
import { ReactiveFlags, toRaw } from './reactive'
5
import { Dep } from './dep'
6
@@ -71,7 +71,7 @@ export class ComputedRefImpl<T> {
71
trackRefValue(self)
72
if (self._dirty || !self._cacheable) {
73
const newValue = self.effect.run()!
74
- if (self._value !== newValue) {
+ if (hasChanged(self._value, newValue)) {
75
triggerRefValue(this, undefined)
76
}
77
self._value = newValue
0 commit comments