Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3be2105

Browse files
committed
try load lodash, otherwise use global _
1 parent b7c7b3b commit 3be2105

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gridstack.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
}
1111
else if (typeof exports !== 'undefined') {
1212
try { jQuery = require('jquery'); } catch(e) {}
13-
factory(jQuery, require("lodash"));
13+
try { _ = require('lodash'); } catch(e) {}
14+
factory(jQuery, _);
1415
}
1516
else {
1617
factory(jQuery, _);

0 commit comments

Comments
 (0)