From 50185fd3d71e647ac34af5d6366e10b469c8373b Mon Sep 17 00:00:00 2001 From: CylonicRaider Date: Mon, 12 Dec 2016 23:29:23 +0100 Subject: [PATCH] Fix donation banner bugs - The HEIM_DONATION_URL variable was not properly propagated into the build. - The donation store would race with the localStorage one for the latter's load event. --- client/gulpfile.babel.js | 1 + client/lib/stores/donations.js | 1 + 2 files changed, 2 insertions(+) diff --git a/client/gulpfile.babel.js b/client/gulpfile.babel.js index 53b88fe6..3692aaa9 100644 --- a/client/gulpfile.babel.js +++ b/client/gulpfile.babel.js @@ -36,6 +36,7 @@ const heimOptions = { HEIM_PREFIX: process.env.HEIM_PREFIX || '', EMBED_ORIGIN: process.env.EMBED_ORIGIN, NODE_ENV: process.env.NODE_ENV, + HEIM_DONATION_URL: process.env.HEIM_DONATION_URL, } // via https://github.com/tblobaum/git-rev diff --git a/client/lib/stores/donations.js b/client/lib/stores/donations.js index dc316c9a..9d8babea 100644 --- a/client/lib/stores/donations.js +++ b/client/lib/stores/donations.js @@ -13,6 +13,7 @@ const store = module.exports.store = Reflux.createStore({ } this.listenTo(storage.load, this.onStorageLoad) this.listenTo(actions.sendMessage, this.onMessageSend) + if (storage.store.state !== null) this.onStorageLoad() }, getInitialState() {