mirror of https://github.com/jetkvm/kvm.git
fix(ui): shouldn't pass custom version to onConfirmCustomUpdate if not available
This commit is contained in:
parent
3fab951d43
commit
0cc84f0c54
|
|
@ -101,10 +101,9 @@ export function Dialog({
|
||||||
const { modalView, setModalView, otaState } = useUpdateStore();
|
const { modalView, setModalView, otaState } = useUpdateStore();
|
||||||
const forceCustomUpdate = customSystemVersion !== undefined || customAppVersion !== undefined;
|
const forceCustomUpdate = customSystemVersion !== undefined || customAppVersion !== undefined;
|
||||||
const onConfirmCustomUpdate = useCallback(() => {
|
const onConfirmCustomUpdate = useCallback(() => {
|
||||||
console.debug("onConfirmCustomUpdate", customAppVersion, customSystemVersion, versionInfo);
|
|
||||||
onConfirmCustomUpdateCallback(
|
onConfirmCustomUpdateCallback(
|
||||||
customAppVersion !== undefined ? customAppVersion : versionInfo?.remote?.appVersion,
|
customAppVersion !== undefined ? versionInfo?.remote?.appVersion : undefined,
|
||||||
customSystemVersion !== undefined ? customSystemVersion : versionInfo?.remote?.systemVersion,
|
customSystemVersion !== undefined ? versionInfo?.remote?.systemVersion : undefined,
|
||||||
);
|
);
|
||||||
}, [onConfirmCustomUpdateCallback, customAppVersion, customSystemVersion, versionInfo]);
|
}, [onConfirmCustomUpdateCallback, customAppVersion, customSystemVersion, versionInfo]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue