Skip to content

Commit

Permalink
fix: change document check to avoid reference error
Browse files Browse the repository at this point in the history
  • Loading branch information
henrijoss authored Jun 11, 2024
1 parent bdd71c7 commit 9d6e555
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function Location(this: Location, element: Document | ShadowRoot) {
new MutationObserver((mutations, observer) => {
// Workaround for
// https://github.com/calebdwilliams/construct-style-sheets/pull/63
if (!document) {
if (typeof document === 'undefined') {
observer.disconnect();
return;
}
Expand Down

0 comments on commit 9d6e555

Please sign in to comment.