construct-style-sheets icon indicating copy to clipboard operation
construct-style-sheets copied to clipboard

fix: change document check to avoid reference error

Open henrijoss opened this issue 1 year ago • 1 comments

Seems like the mutation callback gets executed after the document is gone in vitest which causes following error: Error: Uncaught [ReferenceError: document is not defined]

- if (!document) {
+ if (typeof document === 'undefined') {

By changing the condition like this the check should work as intended.

henrijoss avatar Jun 11 '24 13:06 henrijoss