Skip to content

Commit 716946b

Browse files
committed
Replaced to defineProperties for modify prototype
1 parent 0c67f05 commit 716946b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Installing
1010
Install using NPM
11-
```
11+
```sh
1212
npm install vue-electron --save
1313
```
1414

index.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
const electron = require('electron')
2+
13
module.exports = {
24
install: function (Vue) {
3-
Vue.prototype.$electron = require('electron')
4-
}
5+
Object.defineProperties(Vue.prototype, {
6+
$electron: {
7+
get () {
8+
return electron
9+
},
10+
},
11+
})
12+
},
513
}

0 commit comments

Comments
 (0)