mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 16:35:33 +01:00
Only apply filter if defined.
This commit is contained in:
parent
b211f1cd12
commit
a0e2d68dae
1 changed files with 4 additions and 3 deletions
|
@ -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 <div style={elementStyle}>
|
||||
{mapElement}
|
||||
|
|
Loading…
Reference in a new issue