Commit 228c87cd3b022b174249a77a6a3f978cd6970aaa
1 parent
449c9e78
fixed some bug that not support SSR
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
src/utils/assist.js
@@ -17,6 +17,7 @@ export function camelcaseToHyphen (str) { | @@ -17,6 +17,7 @@ export function camelcaseToHyphen (str) { | ||
17 | // For Modal scrollBar hidden | 17 | // For Modal scrollBar hidden |
18 | let cached; | 18 | let cached; |
19 | export function getScrollBarSize (fresh) { | 19 | export function getScrollBarSize (fresh) { |
20 | + if (isServer) return 0; | ||
20 | if (fresh || cached === undefined) { | 21 | if (fresh || cached === undefined) { |
21 | const inner = document.createElement('div'); | 22 | const inner = document.createElement('div'); |
22 | inner.style.width = '100%'; | 23 | inner.style.width = '100%'; |