We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa87bdc + bd68002 commit 0821858Copy full SHA for 0821858
src/index.ts
@@ -7,7 +7,7 @@ export interface ScrollbarWidth {
7
export const scrollbarWidth: ScrollbarWidth = (force?: boolean): number | undefined => {
8
// safety check for SSR
9
/* istanbul ignore next */
10
- if (!document) {
+ if (typeof document === 'undefined') {
11
return 0;
12
}
13
0 commit comments