Skip to content

Commit

Permalink
refactor(mock): remove unnecessary await (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjing2222 authored Feb 24, 2025
1 parent ba4406d commit 2ddb662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/mock/src/mockDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export const mockDatabase =
},
async getBundleById(bundleId: string) {
await sleep(minMax(latency.min, latency.max));
return (await bundles.find((b) => b.id === bundleId)) ?? null;
return bundles.find((b) => b.id === bundleId) ?? null;
},
async getBundles() {
await sleep(minMax(latency.min, latency.max));
return await bundles.sort((a, b) => a.id.localeCompare(b.id));
return bundles.sort((a, b) => a.id.localeCompare(b.id));
},
};
};

0 comments on commit 2ddb662

Please sign in to comment.