mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-28 09:20:52 +01:00
Fix null key error
This commit is contained in:
parent
858d87da81
commit
7133df226f
@ -84,8 +84,8 @@ app.on("ready", async () => {
|
|||||||
// SAVE LAST IMAGE PATH TO LOCAL STORAGE
|
// SAVE LAST IMAGE PATH TO LOCAL STORAGE
|
||||||
mainWindow.webContents
|
mainWindow.webContents
|
||||||
.executeJavaScript('localStorage.getItem("lastImagePath");', true)
|
.executeJavaScript('localStorage.getItem("lastImagePath");', true)
|
||||||
.then((lastImagePath) => {
|
.then((lastImagePath: string | null) => {
|
||||||
if (lastImagePath.length > 0) {
|
if (lastImagePath && lastImagePath.length > 0) {
|
||||||
imagePath = lastImagePath;
|
imagePath = lastImagePath;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -93,8 +93,8 @@ app.on("ready", async () => {
|
|||||||
// SAVE LAST FOLDER PATH TO LOCAL STORAGE
|
// SAVE LAST FOLDER PATH TO LOCAL STORAGE
|
||||||
mainWindow.webContents
|
mainWindow.webContents
|
||||||
.executeJavaScript('localStorage.getItem("lastFolderPath");', true)
|
.executeJavaScript('localStorage.getItem("lastFolderPath");', true)
|
||||||
.then((lastFolderPath) => {
|
.then((lastFolderPath: string | null) => {
|
||||||
if (lastFolderPath.length > 0) {
|
if (lastFolderPath && lastFolderPath.length > 0) {
|
||||||
folderPath = lastFolderPath;
|
folderPath = lastFolderPath;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -105,8 +105,8 @@ app.on("ready", async () => {
|
|||||||
'localStorage.getItem("lastCustomModelsFolderPath");',
|
'localStorage.getItem("lastCustomModelsFolderPath");',
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
.then((lastCustomModelsFolderPath) => {
|
.then((lastCustomModelsFolderPath: string | null) => {
|
||||||
if (lastCustomModelsFolderPath.length > 0) {
|
if (lastCustomModelsFolderPath && lastCustomModelsFolderPath.length > 0) {
|
||||||
customModelsFolderPath = lastCustomModelsFolderPath;
|
customModelsFolderPath = lastCustomModelsFolderPath;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -114,8 +114,8 @@ app.on("ready", async () => {
|
|||||||
// SAVE LAST CUSTOM MODELS FOLDER PATH TO LOCAL STORAGE
|
// SAVE LAST CUSTOM MODELS FOLDER PATH TO LOCAL STORAGE
|
||||||
mainWindow.webContents
|
mainWindow.webContents
|
||||||
.executeJavaScript('localStorage.getItem("lastOutputFolderPath");', true)
|
.executeJavaScript('localStorage.getItem("lastOutputFolderPath");', true)
|
||||||
.then((lastOutputFolderPath) => {
|
.then((lastOutputFolderPath: string | null) => {
|
||||||
if (lastOutputFolderPath.length > 0) {
|
if (lastOutputFolderPath && lastOutputFolderPath.length > 0) {
|
||||||
outputFolderPath = lastOutputFolderPath;
|
outputFolderPath = lastOutputFolderPath;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "upscayl",
|
"name": "upscayl",
|
||||||
"version": "2.0.1",
|
"version": "2.5.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "upscayl",
|
"name": "upscayl",
|
||||||
"version": "2.0.1",
|
"version": "2.5.0",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"app-root-dir": "^1.0.2",
|
"app-root-dir": "^1.0.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user