Address remaining PR review comments
- Fix getAllInstances to handle empty instance array without throwing - Persist updated token expiry timestamps to disk after refresh - Mark internal httpJson helpers as @internal instead of @public Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -96,6 +96,9 @@ export async function getAllInstances(): Promise<{
|
||||
selected: StoredInstance | undefined;
|
||||
}> {
|
||||
const { instances } = await readAll();
|
||||
if (instances.length === 0) {
|
||||
return { instances: [], selected: undefined };
|
||||
}
|
||||
const selected = instances.find(i => i.selected) ?? instances[0];
|
||||
return {
|
||||
instances: instances.map(i => ({
|
||||
|
||||
Reference in New Issue
Block a user