From b51a0fafe9fc31cc0611f9c055edd1566efd9bf8 Mon Sep 17 00:00:00 2001 From: Fabian Rauch Date: Sun, 21 May 2023 21:31:34 +0200 Subject: [PATCH] bugfix for browser usage --- src/gmynd.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gmynd.js b/src/gmynd.js index 7616081..61d2df8 100644 --- a/src/gmynd.js +++ b/src/gmynd.js @@ -647,4 +647,7 @@ if (typeof window !== 'undefined') { window.gmynd = gmynd; } -module.exports = gmynd; \ No newline at end of file +if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { + // if in a node project + module.exports = gmynd; +} \ No newline at end of file