Skip to content

Commit

Permalink
fix: prevent fatal error with undefined module
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed May 21, 2019
1 parent 4a8859a commit 36f4474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var EcomCart = {}
// set EcomCart object globally
window.EcomCart = EcomCart
}
if (module && module.exports) {
if (typeof module !== 'undefined' && module.exports) {
// Node.js
module.exports = EcomCart
}
Expand Down

0 comments on commit 36f4474

Please # to comment.