File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 2828 return {
2929 detaInstance: undefined ,
3030 saveText: ' Save Settings' ,
31- error: undefined
31+ error: undefined ,
32+ closeAfterUpdate: false
3233 }
3334 },
3435 methods: {
5152 this .saveText = ' Saved!'
5253 this .error = undefined
5354
55+ // Close window after configuration on installation
56+ if (this .closeAfterUpdate ) {
57+ setTimeout (() => {
58+ window .close ()
59+ }, 500 )
60+ }
61+
5462 setTimeout (() => {
5563 this .saveText = ' Save Settings'
5664 }, 2000 )
9098 },
9199 created () {
92100 chrome .storage .local .get ((items ) => {
101+ // detaInstance will be undefined on installation
102+ if (! items .detaInstance ) {
103+ this .closeAfterUpdate = true
104+ return
105+ }
106+
93107 this .detaInstance = items .detaInstance
94108 })
95109 }
You can’t perform that action at this time.
0 commit comments