verify commit field exists
This commit is contained in:
parent
fa48b2fdbc
commit
f46826d696
2 changed files with 5 additions and 7 deletions
|
@ -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: ""
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue