Return an error when no repository data
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-09-16 16:43:57 +02:00
parent 716c953469
commit 0ab96472e4
2 changed files with 3 additions and 1 deletions

View File

@ -106,7 +106,7 @@ export async function getRepositories(wid, userid) {
if (data) { if (data) {
return data.map((r) => new WorkRepository(r)); return data.map((r) => new WorkRepository(r));
} else { } else {
return []; throw new Error("No repository attached");
} }
} else { } else {
throw new Error((await res.json()).errmsg); throw new Error((await res.json()).errmsg);

View File

@ -93,6 +93,8 @@
</div> </div>
{/each} {/each}
</div> </div>
{:catch err}
-
{/await} {/await}
</td> </td>
<td> <td>