The WebFontLoader breaks when imported in a server side rendered app

Author: gfpachecoCreated Oct 24, 2017Updated Dec 10, 2023

I have a React app running with SSR.

When I import WebFontLoader from 'webfontloader' the SSR crashes with window is not defined.

Would it make sense to add a check for typeof window !== 'undefined' in the package?

If not I would have to fork and maintain such change. Thanks