fix: navbar's regression - siteName null check

This commit is contained in:
ULIVZ
2018-08-10 00:22:19 +08:00
parent 03c812bba2
commit 02a4713375
+2 -1
View File
@@ -58,7 +58,8 @@ export default {
if (document.documentElement.clientWidth < MOBILE_DESKTOP_BREAKPOINT) {
this.linksWrapMaxWidth = null
} else {
this.linksWrapMaxWidth = this.$el.offsetWidth - NAVBAR_VERTICAL_PADDING - this.$refs.siteName.offsetWidth
this.linksWrapMaxWidth = this.$el.offsetWidth - NAVBAR_VERTICAL_PADDING -
(this.$refs.siteName && this.$refs.siteName.offsetWidth || 0)
}
}
handleLinksWrapWidth()