Skip to content

Commit ced3d8e

Browse files
committed
fix: this.$q.notify (Quasar Notify Plugin) not available in main App Vue instance quasarframework#1797
1 parent 0d41652 commit ced3d8e

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

src/plugins/notify.js

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -149,35 +149,24 @@ function init ({ $q, Vue }) {
149149
})
150150

151151
this.__vm.$mount(node)
152-
$q.notify = this.create.bind(this)
153152
}
154153

155154
export default {
156155
create (opts) {
157-
if (isSSR) {
158-
return
159-
}
160-
161-
if (this.__vm !== void 0) {
162-
return this.__vm.add(opts)
156+
if (!isSSR) {
157+
this.__vm.add(opts)
163158
}
164-
165-
ready(() => {
166-
setTimeout(() => {
167-
this.create(opts)
168-
})
169-
})
170159
},
171160

172161
__installed: false,
173162
install (args) {
174163
if (this.__installed) { return }
175164
this.__installed = true
176165

166+
console.log('install')
177167
if (!isSSR) {
178-
ready(() => {
179-
init.call(this, args)
180-
})
168+
init.call(this, args)
181169
}
170+
args.$q.notify = this.create.bind(this)
182171
}
183172
}

0 commit comments

Comments
 (0)