diff --git a/dist/gridstack.js b/dist/gridstack.js index 4c5880909..8c08a5f33 100644 --- a/dist/gridstack.js +++ b/dist/gridstack.js @@ -6,7 +6,9 @@ * @preserve */ (function(factory) { - if (typeof define === 'function' && define.amd) { + if ($ && _) { + factory($, _); + } else if (typeof define === 'function' && define.amd) { define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable', 'jquery-ui/resizable'], factory); } else if (typeof exports !== 'undefined') { diff --git a/src/gridstack.js b/src/gridstack.js index fe2126be2..8a284d211 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -6,7 +6,9 @@ * @preserve */ (function(factory) { - if (typeof define === 'function' && define.amd) { + if ($ && _) { + factory($, _); + } else if (typeof define === 'function' && define.amd) { define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable', 'jquery-ui/resizable'], factory); } else if (typeof exports !== 'undefined') {