Skip to content

Commit

Permalink
wrap slick.grid.js in a function so it won't instantly throw an excep…
Browse files Browse the repository at this point in the history
…tion when the module is loaded
  • Loading branch information
DanielGarrettBraze committed Jan 8, 2021
1 parent 2f3bfea commit b2b2770
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"repository": "[email protected]:braze-inc/SlickGrid.git",
"author": "Braze",
"license": "UNLICENSED",
"private": true
"publishConfig": {
"registry": "https://registry.npmjs.org/"
}
}
6 changes: 5 additions & 1 deletion slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* THIS FILE HAS BEEN MODIFIED BY APPBOY! Cmd-F "Appboy Modification" for more details.
*/

export default function() {

// make sure required JavaScript modules are loaded
if (typeof jQuery === "undefined") {
throw "SlickGrid requires jquery module to be loaded";
Expand Down Expand Up @@ -3599,4 +3601,6 @@ if (typeof Slick === "undefined") {

init();
}
}(jQuery));
}(jQuery));

}

0 comments on commit b2b2770

Please sign in to comment.