diff --git a/docs/.vuepress/theme/NotFound.vue b/docs/.vuepress/theme/NotFound.vue
index 02465515..6468a80b 100644
--- a/docs/.vuepress/theme/NotFound.vue
+++ b/docs/.vuepress/theme/NotFound.vue
@@ -9,7 +9,9 @@
href="https://github.com/noties/Markwon/raw/sample-store/markwon-debug.apk"
>sample app and open
this link again or try local one (if you already have app installed):
- {{ buildLocalDeeplink() }}
+ {{ buildLocalDeeplink() }}
@@ -35,16 +37,17 @@ export default {
return msgs[Math.floor(Math.random() * msgs.length)];
},
isSampleLink() {
- const path = window.location.href;
- return /^.*\/app\/(sample|search).*$/.test(path);
+ return /^.*\/app\/(sample|search).*$/.test(this.path());
},
currentWindowLocation() {
- return window.location.href;
+ return window && window.location.href;
},
buildLocalDeeplink() {
- const path = window.location.href;
- const link = /.*\/app\/((?:sample|search).*)/.exec(path)[1];
+ const link = /.*\/app\/((?:sample|search).*)/.exec(this.path())[1];
return "markwon://" + link;
+ },
+ path() {
+ return this.$route.fullPath;
}
}
};