We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0552fbf commit 2f3e2f4Copy full SHA for 2f3e2f4
index.ts
@@ -909,11 +909,15 @@ export const OpenAIOAuthPlugin: Plugin = async ({ client }: PluginInput) => {
909
}
910
911
912
+ const fallbackAccountIdsToDelete: string[] = [];
913
for (const [accountId, fallbackIndex] of entry.fallbackByAccountId) {
914
if (collapseFallbackIndex(fallbackIndex)) {
- entry.fallbackByAccountId.delete(accountId);
915
+ fallbackAccountIdsToDelete.push(accountId);
916
917
918
+ for (const accountId of fallbackAccountIdsToDelete) {
919
+ entry.fallbackByAccountId.delete(accountId);
920
+ }
921
};
922
923
for (let i = 0; i < accounts.length; i += 1) {
0 commit comments