File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,14 @@ import { isRef, UnwrapRef } from './ref'
16
16
import { rawSet , accessModifiedSet } from '../utils/sets'
17
17
import { isForceTrigger } from './force'
18
18
19
+ const SKIPFLAG = '__v_skip'
20
+
19
21
export function isRaw ( obj : any ) : boolean {
20
22
return Boolean (
21
23
obj &&
22
24
hasOwn ( obj , '__ob__' ) &&
23
25
typeof obj . __ob__ === 'object' &&
24
- obj . __ob__ ?. __raw__
26
+ obj . __ob__ ?. [ SKIPFLAG ]
25
27
)
26
28
}
27
29
@@ -30,7 +32,7 @@ export function isReactive(obj: any): boolean {
30
32
obj &&
31
33
hasOwn ( obj , '__ob__' ) &&
32
34
typeof obj . __ob__ === 'object' &&
33
- ! obj . __ob__ ?. __raw__
35
+ ! obj . __ob__ ?. [ SKIPFLAG ]
34
36
)
35
37
}
36
38
@@ -261,7 +263,7 @@ export function markRaw<T extends object>(obj: T): T {
261
263
262
264
// set the vue observable flag at obj
263
265
const ob = createObserver ( )
264
- ob . __raw__ = true
266
+ ob [ SKIPFLAG ] = true
265
267
def ( obj , '__ob__' , ob )
266
268
267
269
// mark as Raw
You can’t perform that action at this time.
0 commit comments