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.
1 parent ca4350b commit 9f9384fCopy full SHA for 9f9384f
src/reactivity/unwrap.ts
@@ -1,29 +1,16 @@
1
import { isRef } from './ref'
2
-import { proxy, isFunction, isObject, isArray } from '../utils'
+import { proxy, isFunction, isPlainObject, isArray } from '../utils'
3
import { isReactive } from './reactive'
4
5
export function unwrapRefProxy(value: any) {
6
- if (isFunction(value)) {
7
- return value
8
- }
9
-
10
- if (isRef(value)) {
11
12
13
14
- if (isArray(value)) {
15
16
17
18
- if (isReactive(value)) {
19
20
21
22
- if (!isObject(value)) {
23
24
25
26
- if (!Object.isExtensible(value)) {
+ if (
+ isFunction(value) ||
+ isRef(value) ||
+ isArray(value) ||
+ isReactive(value) ||
+ !isPlainObject(value) ||
+ !Object.isExtensible(value)
+ ) {
27
return value
28
}
29
0 commit comments