Skip to content

Commit 0821858

Browse files
authored
Merge pull request #21 from michellocana/master
Adjusting document check for SSR
2 parents fa87bdc + bd68002 commit 0821858

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface ScrollbarWidth {
77
export const scrollbarWidth: ScrollbarWidth = (force?: boolean): number | undefined => {
88
// safety check for SSR
99
/* istanbul ignore next */
10-
if (!document) {
10+
if (typeof document === 'undefined') {
1111
return 0;
1212
}
1313

0 commit comments

Comments
 (0)