File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,6 @@ const create = Components.detect(
115115 }
116116
117117 function getIsSafeWindowCheck ( node : Rule . NodeParentExtension ) {
118-
119118 // check if the window usage is behind a typeof window === 'undefined' check
120119 const conditionalExpressionNode = node . parent ?. parent ;
121120 const isWindowCheck =
@@ -142,8 +141,7 @@ const create = Components.detect(
142141 ( isNegatedWindowCheck &&
143142 conditionalExpressionNode . consequent === node ?. parent ) ;
144143
145- return isSafelyBehindWindowCheck
146-
144+ return isSafelyBehindWindowCheck ;
147145 }
148146
149147 const reactImports : Record < string | "namespace" , string | string [ ] > = {
@@ -243,9 +241,8 @@ const create = Components.detect(
243241 const scopeType = context . getScope ( ) . type ;
244242
245243 const isSafelyBehindWindowCheck = getIsSafeWindowCheck ( node ) ;
246-
247244
248- if (
245+ if (
249246 undeclaredReferences . has ( name ) &&
250247 browserOnlyGlobals . has ( name ) &&
251248 ( scopeType === "module" || ! ! util . getParentComponent ( node ) ) &&
You can’t perform that action at this time.
0 commit comments