From e0677761f6c20e601881765405106ffe3186b472 Mon Sep 17 00:00:00 2001 From: "Jocelyn Badgley (Twipped)" Date: Thu, 27 Feb 2020 21:02:47 -0800 Subject: [PATCH] =?UTF-8?q?Fix=20race=20condition=20with=20pages=20trying?= =?UTF-8?q?=20to=20use=20assets=20before=20they=E2=80=99re=20loaded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulp/content/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gulp/content/index.js b/gulp/content/index.js index e9211ed..8e7a454 100644 --- a/gulp/content/index.js +++ b/gulp/content/index.js @@ -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);