From ce49cb9ba4c55533e0c8d6dd2efae50631a067f6 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Thu, 18 Apr 2019 13:53:05 -0400 Subject: [PATCH] fix config context if value passed by props not getting overwritten --- src/contexts/Config.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/contexts/Config.jsx b/src/contexts/Config.jsx index 63bc2525a8..9fe44da64c 100644 --- a/src/contexts/Config.jsx +++ b/src/contexts/Config.jsx @@ -24,7 +24,10 @@ class Provider extends Component { } componentDidMount () { - this.fetchConfig(); + const { value } = this.props; + if (!value) { + this.fetchConfig(); + } } async fetchConfig () {