Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
fixed for Electron environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Panik committed Oct 17, 2016
1 parent 448e472 commit dccdbbc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion angular-moment.js
Expand Up @@ -726,9 +726,10 @@
return 'angularMoment';
}

var isElectron = window && window.process && window.process.type;
if (typeof define === 'function' && define.amd) {
define(['angular', 'moment'], angularMoment);
} else if (typeof module !== 'undefined' && module && module.exports && (typeof require === 'function')) {
} else if (typeof module !== 'undefined' && module && module.exports && (typeof require === 'function') && !isElectron) {
module.exports = angularMoment(require('angular'), require('moment'));
} else {
angularMoment(angular, (typeof global !== 'undefined' ? global : window).moment);
Expand Down
2 changes: 1 addition & 1 deletion angular-moment.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dccdbbc

Please sign in to comment.