Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Added window object check
Browse files Browse the repository at this point in the history
With this pull request we can use the library in a server-side environment like node.js
  • Loading branch information
helloIAmPau authored Dec 4, 2021
1 parent 722cf82 commit 85910d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/iodine.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,4 +457,6 @@ export class Iodine {
* Create an instance of the library.
*
*/
window.Iodine = new Iodine();
if(typeof window !== undefined) {
window.Iodine = new Iodine();
}

0 comments on commit 85910d8

Please sign in to comment.