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) {
|
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);
|
||||||
|
@ -93,6 +93,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
{:catch err}
|
||||||
|
-
|
||||||
{/await}
|
{/await}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
Reference in New Issue
Block a user