From f46826d696bc95df5b49741216dd8ecf0961c72a Mon Sep 17 00:00:00 2001 From: booploops <49113086+booploops@users.noreply.github.com> Date: Mon, 28 Feb 2022 22:06:46 -0800 Subject: [PATCH] verify commit field exists --- src/main/base/browserwindow.ts | 6 ++++-- src/renderer/views/pages/themes-github.ejs | 6 +----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts index fd922d43..298c22cf 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -657,7 +657,8 @@ export class BrowserWindow { description: themeJson.description || themeDescription, path: themePath, file: theme, - github_repo: themeJson.github_repo || "" + github_repo: themeJson.github_repo || "", + commit: themeJson.commit || "" }); } else { themeObjects.push({ @@ -665,7 +666,8 @@ export class BrowserWindow { description: themeDescription, path: themePath, file: theme, - github_repo: "" + github_repo: "", + commit: "" }); } } diff --git a/src/renderer/views/pages/themes-github.ejs b/src/renderer/views/pages/themes-github.ejs index dab29652..6bdf6eb9 100644 --- a/src/renderer/views/pages/themes-github.ejs +++ b/src/renderer/views/pages/themes-github.ejs @@ -104,8 +104,7 @@ const themes = ipcRenderer.sendSync("get-themes") // for each theme, get the github_repo property and push it to the themesInstalled array, if not blank themes.forEach(theme => { - if (theme.github_repo !== "") { - theme.github_repo = theme.github_repo.toLowerCase() + if (theme.github_repo !== "" && typeof theme.commit != "") { self.themesInstalled.push(theme.github_repo) } }) @@ -182,9 +181,6 @@ .then(response => response.text()) .then(result => { let items = JSON.parse(result).items - items.forEach(repo => { - repo.full_name = repo.full_name.toLowerCase() - }) self.repos = items }) .catch(error => console.log('error', error));