diff --git a/pkg/lib/dialogs.jsx b/pkg/lib/dialogs.jsx index a1e5568b1b7c..ae6110044d8b 100644 --- a/pkg/lib/dialogs.jsx +++ b/pkg/lib/dialogs.jsx @@ -106,7 +106,14 @@ export const WithDialogs = ({ children }) => { const [dialog, setDialog] = useState(null); const Dialogs = { - show: setDialog, + show: component => { + if (dialog !== null) + console.error("Dialogs.show() called for", + JSON.stringify(component), + "while a dialog is already open:", + JSON.stringify(dialog)); + setDialog(component); + }, close: () => setDialog(null), isActive: () => dialog !== null };