Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const isBrowser = typeof window !== 'undefined';
export const win = isBrowser ? /** @type {AnimeJSWindow} */(/** @type {unknown} */(window)) : null;

/** @type {Document|null} */
export const doc = isBrowser ? document : null;
export const doc = isBrowser && typeof document !== 'undefined' ? document : null;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isBrowser should return false in non browser environment. I don't like having this double check "is browser + document is undefined", can you update the isBrowser variable instead?


// Enums

Expand Down