From 21490432046cb59f540a671eb5b9f60998325e25 Mon Sep 17 00:00:00 2001 From: Matt Isenhower Date: Wed, 1 Aug 2018 13:06:20 -0700 Subject: [PATCH] Fix issues with test Splatfest image generation This is a bit hacky but it works for now. --- src/app/twitter/tweets/SplatfestTweet.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/twitter/tweets/SplatfestTweet.js b/src/app/twitter/tweets/SplatfestTweet.js index cd0051b..2b90f57 100644 --- a/src/app/twitter/tweets/SplatfestTweet.js +++ b/src/app/twitter/tweets/SplatfestTweet.js @@ -57,8 +57,10 @@ class SplatfestTweet extends TwitterPostBase { } // Which regions have this Splatfest? - regions() { - let festival = this.getData(); + regions(festival = null) { + if (!festival) + festival = this.getData(); + if (!festival) return false; @@ -84,7 +86,7 @@ class SplatfestTweet extends TwitterPostBase { } getImage(data) { - return captureSplatfestScreenshot(this.region, data.festival.times[data.type], this.regions()); + return captureSplatfestScreenshot(this.region, data.festival.times[data.type], this.regions(data)); } getText(data) {