diff --git a/package.json b/package.json index e532c19..d0cc53d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "2.4.1", + "version": "2.4.2", "license": "MIT", "name": "mui-modal-provider", "author": "Quernest", diff --git a/src/modal-provider.tsx b/src/modal-provider.tsx index 123b7e2..6193c07 100644 --- a/src/modal-provider.tsx +++ b/src/modal-provider.tsx @@ -146,7 +146,7 @@ export default function ModalProvider({ hide(id); } - if (options && options.destroyOnClose) { + if (options && options.destroyOnClose && options.hideOnClose) { destroy(id); }