Skip to content

Commit 02a4713

Browse files
committed
fix: navbar's regression - siteName null check
1 parent 03c812b commit 02a4713

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/default-theme/Navbar.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export default {
5858
if (document.documentElement.clientWidth < MOBILE_DESKTOP_BREAKPOINT) {
5959
this.linksWrapMaxWidth = null
6060
} else {
61-
this.linksWrapMaxWidth = this.$el.offsetWidth - NAVBAR_VERTICAL_PADDING - this.$refs.siteName.offsetWidth
61+
this.linksWrapMaxWidth = this.$el.offsetWidth - NAVBAR_VERTICAL_PADDING -
62+
(this.$refs.siteName && this.$refs.siteName.offsetWidth || 0)
6263
}
6364
}
6465
handleLinksWrapWidth()

0 commit comments

Comments
 (0)