mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
🐛 Fix change position modal not closing when value is 0 #573
This commit is contained in:
@@ -45,7 +45,14 @@ export const ChangePositionModal = ({
|
|||||||
const width = parseInt(form.values.width, 10);
|
const width = parseInt(form.values.width, 10);
|
||||||
const height = parseInt(form.values.height, 10);
|
const height = parseInt(form.values.height, 10);
|
||||||
|
|
||||||
if (!form.values.x || !form.values.y || Number.isNaN(width) || Number.isNaN(height)) return;
|
if (
|
||||||
|
form.values.x === null ||
|
||||||
|
form.values.y === null ||
|
||||||
|
Number.isNaN(width) ||
|
||||||
|
Number.isNaN(height)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
onSubmit(form.values.x, form.values.y, width, height);
|
onSubmit(form.values.x, form.values.y, width, height);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user