Skip to content

Commit 4ac9112

Browse files
authored
Update localstorage.js
1 parent 164d5c6 commit 4ac9112

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

localstorage.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,20 @@ function updateModReposLS() {
137137
// and save to local storage
138138
async function fetchRepoAndSaveToLS(treeLoc) {
139139

140-
// get repo obj from git
140+
// get repository from git
141141
const repo = await git.getRepo(treeLoc);
142142

143-
// create repo obj
144-
145-
// add repo obj to local storage
146-
addRepoObjToLS
143+
// if didn't encounter an error
144+
if (!repo.message) {
145+
146+
// create repo obj
147+
const repoObj = createRepoObj(repo.full_name, repo.default_branch, (item.permissions.push ?? false),
148+
null, repo.private, repo.fork, false);
149+
150+
// add repo obj to local storage
151+
addRepoObjToLS(repoObj);
152+
153+
}
147154

148155
}
149156

0 commit comments

Comments
 (0)