mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 09:25:47 +01:00
Disable beforeunload event in dev
This commit is contained in:
@@ -107,7 +107,7 @@ const ToggleEditModeButton = () => {
|
||||
useHotkeys([['mod+E', toggleEditMode]]);
|
||||
|
||||
useWindowEvent('beforeunload', (event: BeforeUnloadEvent) => {
|
||||
if (enabled) {
|
||||
if (enabled && env.NODE_ENV === 'production') {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
event.returnValue = beforeUnloadEventText;
|
||||
return beforeUnloadEventText;
|
||||
|
||||
Reference in New Issue
Block a user