File tree 1 file changed +5
-12
lines changed
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ let nativeProps = Object.getOwnPropertyNames(window)
7
7
8
8
const MiniJS = ( ( ) => {
9
9
window . proxyWindow = null
10
- const isProxy = Symbol ( 'isProxy' )
11
10
12
11
let _debug = false
13
12
let _ignoredVariables = [ ]
@@ -30,28 +29,22 @@ const MiniJS = (() => {
30
29
31
30
const watchHandler = {
32
31
set : function ( target , property , value ) {
33
- let proxyValue = value
34
- const variable = target . __parent__
35
- ? `${ target . __parent__ } .${ property } `
36
- : property
37
-
38
32
// Set variable to new value
39
- target [ property ] = proxyValue
33
+ target [ property ] = value
40
34
41
35
// Store to localstorage
42
36
if ( property [ 0 ] === '$' ) {
43
- localStorage . setItem ( property , JSON . stringify ( proxyValue ) )
37
+ localStorage . setItem ( property , JSON . stringify ( value ) )
44
38
}
45
39
46
- if ( _variables . includes ( variable ) ) {
47
- updateStates ( variable )
48
- _addMethodsToVariables ( [ variable ] )
40
+ if ( _variables . includes ( property ) ) {
41
+ updateStates ( property )
42
+ _addMethodsToVariables ( [ property ] )
49
43
}
50
44
51
45
return true
52
46
} ,
53
47
get : function ( target , property ) {
54
- if ( property === isProxy ) return true
55
48
return target [ property ]
56
49
} ,
57
50
}
You can’t perform that action at this time.
0 commit comments