Fix race condition with pages trying to use assets before they’re loaded

This commit is contained in:
Jocelyn Badgley (Twipped) 2020-02-27 21:02:47 -08:00
parent 5569fcd3bb
commit e0677761f6

View File

@ -19,7 +19,8 @@ exports.everything = function (prod = false) {
const PublicFiles = await loadPublicFiles();
// load data for all the files in that folder
await Promise.map(PublicFiles.all, (p) => p.load(PublicFiles));
await Promise.map(PublicFiles.assets, (p) => p.load());
await Promise.map(PublicFiles.pages, (p) => p.load(PublicFiles));
// prime tweet data for all pages
const pages = await primeTweets(PublicFiles.pages);