construct-style-sheets
construct-style-sheets copied to clipboard
fix: change document check to avoid reference error
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.