From 0e20d089bb712b50d85e941ea8bb219bc0ae2fd2 Mon Sep 17 00:00:00 2001 From: Skyline Yu Date: Sun, 23 Jun 2019 01:58:35 +0800 Subject: [PATCH] run unsubscribe when ssr prefetch end --- src/mixin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mixin.js b/src/mixin.js index 104bef1..30ba2b7 100644 --- a/src/mixin.js +++ b/src/mixin.js @@ -47,7 +47,11 @@ export default { }) } }, - + serverPrefetch () { + if (this._subscription) { + this._subscription.unsubscribe() + } + }, beforeDestroy () { if (this._subscription) { this._subscription.unsubscribe()