mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
Merge pull request #348 from orangemug/fix/color-filter-undefined
Undefined filter fix (color accessibility)
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -66,6 +66,7 @@ export default class MapboxGlMap extends React.Component {
|
||||
onDataChange: () => {},
|
||||
onLayerSelect: () => {},
|
||||
mapboxAccessToken: tokens.mapbox,
|
||||
options: {},
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
|
||||
Reference in New Issue
Block a user