From 6549c52c8ca199d87b92d68f55c61ee4e38584f7 Mon Sep 17 00:00:00 2001 From: Jan Hagelauer Date: Mon, 10 Feb 2020 13:45:49 +0700 Subject: [PATCH] fixed #29 (1st issue) + Cannot read property 'push' of null --- src/vue-plugin.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vue-plugin.js b/src/vue-plugin.js index 78ea28b..79379be 100644 --- a/src/vue-plugin.js +++ b/src/vue-plugin.js @@ -182,6 +182,9 @@ export default { stop () {}, } } else { */ + if (!this._trackerHandles) { + throw new Error('$subscribe called on destroyed or uninitialized component'); + } const key = args[0]; const oldSub = this._subs[key] let handle = Vue.config.meteor.subscribe.apply(this, args);