Skip to content

Commit b56353a

Browse files
author
Guillaume Chau
committed
fix: remote ie11 support
1 parent 25eacf8 commit b56353a

File tree

4 files changed

+30
-15
lines changed

4 files changed

+30
-15
lines changed

src/.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
rules: {
3+
'no-restricted-syntax': [
4+
'error',
5+
{
6+
selector: 'ForOfStatement',
7+
message: 'Not supported by bublé'
8+
}
9+
]
10+
}
11+
}

src/devtools/.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
rules: {
3+
'no-restricted-syntax': 'off'
4+
}
5+
}

src/shared-data.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,16 @@ function sendValue (key, value) {
7575
})
7676
}
7777

78-
// Proxy traps
79-
const traps = {
80-
get (target, key) {
81-
return vm && vm.$data[key]
82-
},
83-
set (target, key, value) {
84-
sendValue(key, value)
85-
return setValue(key, value)
86-
}
87-
}
88-
89-
const SharedDataProxy = new Proxy({}, traps)
78+
const proxy = {}
79+
Object.keys(internalSharedData).forEach(key => {
80+
Object.defineProperty(proxy, key, {
81+
configurable: false,
82+
get: () => vm && vm.$data[key],
83+
set: (value) => {
84+
sendValue(key, value)
85+
setValue(key, value)
86+
}
87+
})
88+
})
9089

91-
export default SharedDataProxy
90+
export default proxy

src/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ export function set (object, path, value, cb = null) {
480480

481481
export function get (object, path) {
482482
const sections = path.split('.')
483-
for (const section of sections) {
484-
object = object[section]
483+
for (let i = 0; i < sections.length; i++) {
484+
object = object[sections[i]]
485485
if (!object) {
486486
return undefined
487487
}

0 commit comments

Comments
 (0)