mirror of https://github.com/vuejs/core.git
				
				
				
			fix: add receiver is not the reactive proxy judging condition
This commit is contained in:
		
							parent
							
								
									4138f2153f
								
							
						
					
					
						commit
						3fc414e396
					
				| 
						 | 
				
			
			@ -349,8 +349,8 @@ function createInstrumentationGetter(isReadonly: boolean, shallow: boolean) {
 | 
			
		|||
      return !isReadonly
 | 
			
		||||
    } else if (key === ReactiveFlags.IS_READONLY) {
 | 
			
		||||
      return isReadonly
 | 
			
		||||
    } else if (
 | 
			
		||||
      key === ReactiveFlags.RAW &&
 | 
			
		||||
    } else if (key === ReactiveFlags.RAW) {
 | 
			
		||||
      if (
 | 
			
		||||
        receiver ===
 | 
			
		||||
          (isReadonly
 | 
			
		||||
            ? shallow
 | 
			
		||||
| 
						 | 
				
			
			@ -358,10 +358,17 @@ function createInstrumentationGetter(isReadonly: boolean, shallow: boolean) {
 | 
			
		|||
              : readonlyMap
 | 
			
		||||
            : shallow
 | 
			
		||||
              ? shallowReactiveMap
 | 
			
		||||
            : reactiveMap).get(target as Target)
 | 
			
		||||
              : reactiveMap
 | 
			
		||||
          ).get(target as Target) ||
 | 
			
		||||
        // receiver is not the reactive proxy, but has the same prototype
 | 
			
		||||
        // this means the reciever is a user proxy of the reactive proxy
 | 
			
		||||
        Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)
 | 
			
		||||
      ) {
 | 
			
		||||
        return target
 | 
			
		||||
      }
 | 
			
		||||
      // early return undefined
 | 
			
		||||
      return
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return Reflect.get(
 | 
			
		||||
      hasOwn(instrumentations, key) && key in target
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue