diff options
author | Benjamin Tan <demoneaux@gmail.com> | 2015-12-11 15:12:44 +0800 |
---|---|---|
committer | Benjamin Tan <demoneaux@gmail.com> | 2015-12-11 15:12:44 +0800 |
commit | 70055af1f2876c24e66f3f58d7ca435cd828698f (patch) | |
tree | 75fee7c82e78d96a4a744f02418bfb4a2d790601 | |
parent | 2dae7fd9d23752abff4f230c060b4d625bb77031 (diff) | |
download | awesomplete-70055af1f2876c24e66f3f58d7ca435cd828698f.zip awesomplete-70055af1f2876c24e66f3f58d7ca435cd828698f.tar.gz awesomplete-70055af1f2876c24e66f3f58d7ca435cd828698f.tar.bz2 |
Fix issue when an element with ID of `exports` is defined in the browser.
Elements with IDs automatically have their IDs exposed. This causes errors
where `module` is not defined, and yet `module.exports = _` is run. This also
aligns the export with UMD.
-rw-r--r-- | awesomplete.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/awesomplete.js b/awesomplete.js index 4d8c288..5e85fc1 100644 --- a/awesomplete.js +++ b/awesomplete.js @@ -383,7 +383,7 @@ if (typeof self !== "undefined") { } // Expose Awesomplete as a CJS module -if (typeof exports === "object") { +if (typeof module === "object" && module.exports) { module.exports = _; } |