From 46fdae7739b638c2aed831cceabbf87725b159c2 Mon Sep 17 00:00:00 2001 From: Ed Brett Date: Fri, 25 Jan 2019 10:53:17 +0100 Subject: [PATCH] fix fetch for country white list on global level --- .../providers/whitelists-provider/whitelists-provider.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/providers/whitelists-provider/whitelists-provider.js b/app/javascript/providers/whitelists-provider/whitelists-provider.js index 9d6f2b2a26..cd6c39d4c5 100644 --- a/app/javascript/providers/whitelists-provider/whitelists-provider.js +++ b/app/javascript/providers/whitelists-provider/whitelists-provider.js @@ -17,7 +17,9 @@ class WhitelistProvider extends PureComponent { getCountryWhitelist, getRegionWhitelist } = this.props; - getCountryWhitelist(adm0); + if (adm0) { + getCountryWhitelist(adm0); + } if (adm1) { getRegionWhitelist({ adm0, adm1, adm2 }); }