refactor(reactivity): move array ref handling into getter
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
mutableCollectionHandlers,
|
||||
readonlyCollectionHandlers
|
||||
} from './collectionHandlers'
|
||||
import { UnwrapRef, Ref, isRef } from './ref'
|
||||
import { UnwrapRef, Ref } from './ref'
|
||||
import { makeMap } from '@vue/shared'
|
||||
|
||||
// WeakMaps that store {raw <-> observed} pairs.
|
||||
@@ -46,9 +46,6 @@ export function reactive(target: object) {
|
||||
if (readonlyToRaw.has(target)) {
|
||||
return target
|
||||
}
|
||||
if (isRef(target)) {
|
||||
return target
|
||||
}
|
||||
return createReactiveObject(
|
||||
target,
|
||||
rawToReactive,
|
||||
|
||||
Reference in New Issue
Block a user