0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-24 22:46:02 -05:00

refactor: regexp -> endsWith

This commit is contained in:
bholmesdev 2024-02-29 16:27:50 -05:00
parent dc0af089e6
commit 868beb535c

View file

@ -57,7 +57,7 @@ export async function seedDev({
}) { }) {
await recreateTables({ db, tables }); await recreateTables({ db, tables });
for (const fileName of SEED_DEV_FILE_NAMES_SORTED) { for (const fileName of SEED_DEV_FILE_NAMES_SORTED) {
const key = Object.keys(fileGlob).find((f) => new RegExp(`${fileName}$`).test(f)); const key = Object.keys(fileGlob).find((f) => f.endsWith(fileName));
if (key) { if (key) {
await fileGlob[key](); await fileGlob[key]();
return; return;