Skip to content

Commit

Permalink
fix unnecessary require of angular (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
qetr1ck-op authored and justinsa committed Nov 2, 2016
1 parent 33ccc3a commit 3b1e2cf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
/* globals define */
(function (root, factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
if (typeof module !== 'undefined' && module.exports) {
if (typeof angular === 'undefined') {
factory(require('angular'));
} else {
factory(angular);
}
module.exports = 'angular-google-analytics';
} else if (typeof define === 'function' && define.amd) {
define(['angular'], factory);
} else if (typeof module === 'object' && module.exports) {
module.exports = factory(require('angular'));
} else {
factory(root.angular);
}
Expand Down

0 comments on commit 3b1e2cf

Please sign in to comment.