From 252573372993e2909079add2279953aee347338e Mon Sep 17 00:00:00 2001 From: "zhigang.li" Date: Fri, 29 Jun 2018 17:31:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3anchor=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=9C=A8=E9=A1=B5=E9=9D=A2=E6=B2=A1=E6=9C=89=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=94=9A=E7=82=B9=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/anchor/anchor.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/anchor/anchor.vue b/src/components/anchor/anchor.vue index 0e273d20..c86a8aff 100644 --- a/src/components/anchor/anchor.vue +++ b/src/components/anchor/anchor.vue @@ -93,6 +93,7 @@ export default { handleHashChange () { const url = window.location.href; const sharpLinkMatch = sharpMatcherRegx.exec(url); + if (!sharpLinkMatch) return; this.currentLink = sharpLinkMatch[0]; this.currentId = sharpLinkMatch[1]; },