Skip to content

Commit 5cbba4d

Browse files
committed
#88 destroy only if hideOnClose enabled
1 parent eae7201 commit 5cbba4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.4.1",
2+
"version": "2.4.2",
33
"license": "MIT",
44
"name": "mui-modal-provider",
55
"author": "Quernest",

src/modal-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default function ModalProvider({
146146
hide(id);
147147
}
148148

149-
if (options && options.destroyOnClose) {
149+
if (options && options.destroyOnClose && options.hideOnClose) {
150150
destroy(id);
151151
}
152152

0 commit comments

Comments
 (0)