Skip to content

Commit

Permalink
Merge pull request #2 from arthurjamain/fixes-module-export
Browse files Browse the repository at this point in the history
Fixes module declaration
  • Loading branch information
cedricpinson committed Dec 15, 2015
2 parents 2282f4a + e279c65 commit 1bd90fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/rStats.extras.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ window.BrowserStats = function () {

};

module.exports = {
glStats: window.glStats,
threeStats: window.threeStats,
BrowserStats: window.BrowserStats
};
if (typeof module === 'object') {
module.exports = {
glStats: window.glStats,
threeStats: window.threeStats,
BrowserStats: window.BrowserStats
};
}
6 changes: 5 additions & 1 deletion src/rStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

} )();

module.exports = window.rStats = rStats ( settings ) {
window.rStats = function rStats ( settings ) {

function iterateKeys ( array, callback ) {
var keys = Object.keys( array );
Expand Down Expand Up @@ -425,3 +425,7 @@ module.exports = window.rStats = rStats ( settings ) {
};

}

if (typeof module === 'object') {
module.exports = window.rStats;
}

0 comments on commit 1bd90fe

Please sign in to comment.