Return an error when no repository data
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
716c953469
commit
0ab96472e4
@ -106,7 +106,7 @@ export async function getRepositories(wid, userid) {
|
||||
if (data) {
|
||||
return data.map((r) => new WorkRepository(r));
|
||||
} else {
|
||||
return [];
|
||||
throw new Error("No repository attached");
|
||||
}
|
||||
} else {
|
||||
throw new Error((await res.json()).errmsg);
|
||||
|
@ -93,6 +93,8 @@
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:catch err}
|
||||
-
|
||||
{/await}
|
||||
</td>
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user