Skip to content

Commit

Permalink
Invalid comparison (#878)
Browse files Browse the repository at this point in the history
Hey there :) While analyzing the project I found this small issue.

The typeof is compared to undefined. This comparison is invalid because typeof always returns strings.
  • Loading branch information
cesarkohl authored May 8, 2023
1 parent 0c5ff1d commit fea8c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/legacy/src/hooks/useScrollPosition/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
******************************************************************************************************************** */
import { useRef } from 'react';

const isBrowser = typeof window != undefined;
const isBrowser = typeof window !== 'undefined';

export interface ScrollPosition {
x: number;
Expand Down

0 comments on commit fea8c4d

Please sign in to comment.