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

Commit

Permalink
fix(*): consistent export value for AMD and commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Oct 6, 2016
1 parent 8fa1c43 commit 919882e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions angular-moment.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @description
* angularMoment module provides moment.js functionality for angular.js apps.
*/
return angular.module('angularMoment', [])
angular.module('angularMoment', [])

/**
* @ngdoc object
Expand Down Expand Up @@ -722,13 +722,14 @@

return amEndOfFilter;
}]);

return 'angularMoment';
}

if (typeof define === 'function' && define.amd) {
define(['angular', 'moment'], angularMoment);
} else if (typeof module !== 'undefined' && module && module.exports) {
angularMoment(require('angular'), require('moment'));
module.exports = 'angularMoment';
module.exports = angularMoment(require('angular'), require('moment'));
} else {
angularMoment(angular, (typeof global !== 'undefined' ? global : window).moment);
}
Expand Down

1 comment on commit 919882e

@tdwhite0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just learned a hard lesson about dependency management.

Please sign in to comment.