@4i/modal-manager 1.1.32 → 1.1.34
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
CHANGED
@@ -144,7 +144,7 @@ var ModalProvider = function (_a) {
|
|
144
144
|
return [2 /*return*/];
|
145
145
|
case 5:
|
146
146
|
indexToRemove = position;
|
147
|
-
if (
|
147
|
+
if (typeof indexToRemove !== "number" ||
|
148
148
|
indexToRemove < 0 ||
|
149
149
|
indexToRemove >= modals.length) {
|
150
150
|
// Если индекс невалидный, закрываем последний
|
@@ -91,10 +91,10 @@ const ModalProvider: React.FC<ModalProviderProps> = ({
|
|
91
91
|
}
|
92
92
|
|
93
93
|
// Обработка числовых позиций
|
94
|
-
let indexToRemove: number
|
94
|
+
let indexToRemove: number = position as number;
|
95
95
|
|
96
96
|
if (
|
97
|
-
|
97
|
+
typeof indexToRemove !== "number" ||
|
98
98
|
indexToRemove < 0 ||
|
99
99
|
indexToRemove >= modals.length
|
100
100
|
) {
|