From 3c3372fb60ed9d99b59b5e252a61521c25825b6f Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Mon, 20 May 2019 20:15:00 -0300 Subject: [PATCH] fix: handle export even if window object is available --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index bc2501f..eefbfb4 100644 --- a/src/index.js +++ b/src/index.js @@ -103,7 +103,8 @@ var EcomCart = {} // on browser // set EcomCart object globally window.EcomCart = EcomCart - } else if (module && module.exports) { + } + if (module && module.exports) { // Node.js module.exports = EcomCart }