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:
parent
dc0af089e6
commit
868beb535c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue