Skip to content

Commit

Permalink
Making comatible for AMD / CMD got error for GLOBAL variable. Add che…
Browse files Browse the repository at this point in the history
…ck if it exists before using
  • Loading branch information
Uma committed Aug 11, 2015
1 parent 3d27035 commit a0a0b50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion jsmart.js
Original file line number Diff line number Diff line change
Expand Up @@ -3422,7 +3422,9 @@
if (typeof module === "object" && module && typeof module.exports === "object") {
module.exports = jSmart;
} else {
global.jSmart = jSmart;
if (typeof global !== "undefined") {
global.jSmart = jSmart;
}

if (typeof define === "function" && define.amd) {
define("jSmart", [], function () { return jSmart; });
Expand Down
Loading

0 comments on commit a0a0b50

Please sign in to comment.