From a0e2d68dae82ca978e531fb80af77e94c8d3a788 Mon Sep 17 00:00:00 2001 From: orangemug Date: Tue, 17 Jul 2018 20:40:23 +0100 Subject: [PATCH] Only apply filter if defined. --- src/components/App.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/App.jsx b/src/components/App.jsx index 3051b46..943879b 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -430,9 +430,10 @@ export default class App extends React.Component { onLayerSelect={this.onLayerSelect.bind(this)} /> } - const elementStyle = { - "filter": `url('#${this.state.mapFilter}')` - }; + const elementStyle = {}; + if(this.state.mapFilter) { + elementStyle.filter = `url('#${this.state.mapFilter}')`; + } return
{mapElement}