Skip to content

Commit

Permalink
refactor: implementing XOs suggestion
Browse files Browse the repository at this point in the history
unicorn/no-typeof-undefined
  • Loading branch information
mfranzke committed May 27, 2023
1 parent 329267a commit c504d60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/loading-attribute-polyfill-with-serviceworker.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function onIntersection(entries, observer) {
* Handle printing the page
*/
function onPrinting() {
if (typeof window.matchMedia === 'undefined') {
if (window.matchMedia === undefined) {
return;
}

Expand Down Expand Up @@ -140,7 +140,7 @@ function prepareElement(mediaTag) {
return false;
}

if (typeof intersectionObserver === 'undefined') {
if (intersectionObserver === undefined) {
createRegularReference(mediaTag);
} else {
// Modify the data attribute on the current status
Expand Down

0 comments on commit c504d60

Please sign in to comment.