handle undefined data

This commit is contained in:
SrGooglo 2024-03-25 09:26:50 +01:00
parent 84030da722
commit 42f3944e20

View File

@ -5,6 +5,16 @@ import { Icons } from "components/Icons"
import "./index.less"
const PackageUpdateAvailable = ({ update, close }) => {
if (!update) {
setTimeout(() => {
close()
}, 1000)
return <h1>
Nothing to update
</h1>
}
function handleUpdate() {
ipc.exec("pkg:update", update.manifest.id, {
execOnFinish: true