Skip to content

Commit c504d60

Browse files
committed
refactor: implementing XOs suggestion
unicorn/no-typeof-undefined
1 parent 329267a commit c504d60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/loading-attribute-polyfill-with-serviceworker.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function onIntersection(entries, observer) {
109109
* Handle printing the page
110110
*/
111111
function onPrinting() {
112-
if (typeof window.matchMedia === 'undefined') {
112+
if (window.matchMedia === undefined) {
113113
return;
114114
}
115115

@@ -140,7 +140,7 @@ function prepareElement(mediaTag) {
140140
return false;
141141
}
142142

143-
if (typeof intersectionObserver === 'undefined') {
143+
if (intersectionObserver === undefined) {
144144
createRegularReference(mediaTag);
145145
} else {
146146
// Modify the data attribute on the current status

0 commit comments

Comments
 (0)