@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 +1 -1
- package/react-utils.cjs.js +3 -0
- package/react-utils.cjs.js.map +1 -1
- package/react-utils.js +3 -0
- package/react-utils.js.map +1 -1
package/react-utils.js
CHANGED
|
@@ -3396,6 +3396,9 @@ var useHotKeys = function useHotKeys(hotkey, handler, userConfig) {
|
|
|
3396
3396
|
var ref = useRef(null);
|
|
3397
3397
|
var convertedHotkey = convertHotkeyToUsersPlatform(hotkey);
|
|
3398
3398
|
var config = mergeLeft(userConfig, DEFAULT_CONFIG);
|
|
3399
|
+
if (!handler) {
|
|
3400
|
+
throw new Error("You must provide a handler function to useHotKeys");
|
|
3401
|
+
}
|
|
3399
3402
|
useEffect(function () {
|
|
3400
3403
|
if (!config.enabled) return undefined;
|
|
3401
3404
|
var mousetrapInstance = bindHotKey({
|