Only apply filter if defined.

This commit is contained in:
orangemug 2018-07-17 20:40:23 +01:00
parent b211f1cd12
commit a0e2d68dae

View file

@ -430,9 +430,10 @@ export default class App extends React.Component {
onLayerSelect={this.onLayerSelect.bind(this)} /> onLayerSelect={this.onLayerSelect.bind(this)} />
} }
const elementStyle = { const elementStyle = {};
"filter": `url('#${this.state.mapFilter}')` if(this.state.mapFilter) {
}; elementStyle.filter = `url('#${this.state.mapFilter}')`;
}
return <div style={elementStyle}> return <div style={elementStyle}>
{mapElement} {mapElement}