Skip to content

Commit d5123ec

Browse files
authored
fix: unwrap warning, fix #425 (#430)
1 parent 01524a4 commit d5123ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reactivity/unwrap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isRef } from './ref'
2-
import { proxy, isFunction, isPlainObject, isArray } from '../utils'
2+
import { proxy, isFunction, isPlainObject, isArray, hasOwn } from '../utils'
33
import { isReactive, isRaw } from './reactive'
44

55
export function unwrapRefProxy(value: any, map = new WeakMap()) {
@@ -28,7 +28,7 @@ export function unwrapRefProxy(value: any, map = new WeakMap()) {
2828
)
2929

3030
// copy __ob__
31-
if (value.__ob__) {
31+
if (hasOwn(value, '__ob__')) {
3232
Object.defineProperty(obj, '__ob__', {
3333
enumerable: false,
3434
value: value.__ob__,

0 commit comments

Comments
 (0)