Skip to content

Commit

Permalink
Added support for Common-style require
Browse files Browse the repository at this point in the history
Needed to change module to thisModule so that it didn't overwrite the common.js module global.
  • Loading branch information
Max Pittsley committed Oct 18, 2014
1 parent 80071a7 commit 82ea273
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/jquery.event.move.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
// velocityY: Average velocity over last few events.


(function (module) {
(function (thisModule) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], module);
// AMD. Register as an anonymous module.
define(['jquery'], thisModule);
} else if ((typeof module !== "undefined" && module !== null) && module.exports) {
module.exports = thisModule;
} else {
// Browser globals
module(jQuery);
thisModule(jQuery);
}
})(function(jQuery, undefined){

Expand Down

0 comments on commit 82ea273

Please sign in to comment.