reymond-group / smilesDrawer

A small, highly performant JavaScript component for parsing and drawing SMILES strings. Released under the MIT license.
https://smilesdrawer.rocks
MIT License
434 stars 67 forks source link

Do not set SmilesDrawer on window #67

Closed daenuprobst closed 6 years ago

daenuprobst commented 6 years ago

When the module is loaded through npm (especially with SSR) window is not defined.

Basically this means, if the module is used through import / require, bad things happen.

daenuprobst commented 6 years ago

window.SmilesDrawer is no longer set in a server environment (SSR).