Skip to content

Commit

Permalink
fix: handle export even if window object is available
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed May 20, 2019
1 parent ad7aa63 commit 3c3372f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3c3372f

Please # to comment.