@bigbinary/neeto-commons-frontend 2.1.9 → 2.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
5
5
  "repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -3425,6 +3425,9 @@ var useHotKeys = function useHotKeys(hotkey, handler, userConfig) {
3425
3425
  var ref = React.useRef(null);
3426
3426
  var convertedHotkey = convertHotkeyToUsersPlatform(hotkey);
3427
3427
  var config = ramda.mergeLeft(userConfig, DEFAULT_CONFIG);
3428
+ if (!handler) {
3429
+ throw new Error("You must provide a handler function to useHotKeys");
3430
+ }
3428
3431
  React.useEffect(function () {
3429
3432
  if (!config.enabled) return undefined;
3430
3433
  var mousetrapInstance = bindHotKey({