Skip to content

Commit 3ca0724

Browse files
committed
fix: lint errors
1 parent 8ea82e3 commit 3ca0724

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

sources/accessible-name-and-description.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,9 @@ export function computeTextAlternative(
362362
if (pseudoElement !== undefined) {
363363
return _getComputedStyle(el, pseudoElement);
364364
}
365-
if (computedStyles.has(el)) {
366-
return computedStyles.get(el)!;
365+
const cachedStyles = computedStyles.get(el);
366+
if (cachedStyles) {
367+
return cachedStyles;
367368
}
368369
const style = _getComputedStyle(el, pseudoElement);
369370
computedStyles.set(el, style);

sources/polyfills/MapLike.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ declare global {
55
delete(key: K): boolean;
66
forEach(
77
callbackfn: (value: V, key: K, map: Map<K, V>) => void,
8-
thisArg?: any,
8+
thisArg?: this,
99
): void;
1010
get(key: K): V | undefined;
1111
has(key: K): boolean;
@@ -56,8 +56,8 @@ class MapLike<K, V> {
5656
return this;
5757
}
5858
forEach(
59-
callbackfn: (value: V, key: K, map: MapLike<K, V>) => void,
60-
thisArg?: any,
59+
_callbackfn: (value: V, key: K, map: MapLike<K, V>) => void,
60+
_thisArg?: this,
6161
): void {}
6262
}
6363

0 commit comments

Comments
 (0)