Skip to content

Commit 530bfaf

Browse files
authored
Merge pull request #348 from orangemug/fix/color-filter-undefined
Undefined filter fix (color accessibility)
2 parents 1447e8b + 6ea70ab commit 530bfaf

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/App.jsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,10 @@ export default class App extends React.Component {
430430
onLayerSelect={this.onLayerSelect.bind(this)} />
431431
}
432432

433-
const elementStyle = {
434-
"filter": `url('#${this.state.mapFilter}')`
435-
};
433+
const elementStyle = {};
434+
if(this.state.mapFilter) {
435+
elementStyle.filter = `url('#${this.state.mapFilter}')`;
436+
}
436437

437438
return <div style={elementStyle}>
438439
{mapElement}

src/components/map/MapboxGlMap.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export default class MapboxGlMap extends React.Component {
6666
onDataChange: () => {},
6767
onLayerSelect: () => {},
6868
mapboxAccessToken: tokens.mapbox,
69+
options: {},
6970
}
7071

7172
constructor(props) {

0 commit comments

Comments
 (0)