Skip to content

Commit

Permalink
Support if module is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmartinelli committed May 18, 2017
1 parent 92b2c92 commit 02cc799
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,8 @@ MapboxLanguage.prototype.onRemove = function () {
this._map = undefined;
};

module.exports = MapboxLanguage;
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = MapboxLanguage;
} else {
window.MapboxLanguage = MapboxLanguage;
}

0 comments on commit 02cc799

Please sign in to comment.