Skip to content

Commit bd68002

Browse files
author
Michell Ocana do Espirito Santo
committed
fix: adjusting document check for SSR
1 parent fa87bdc commit bd68002

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)