Skip to content

Commit

Permalink
Use type coercion comparison for matching keys
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntadpear committed Jul 23, 2019
1 parent b19b697 commit 80b6e68
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
27 changes: 27 additions & 0 deletions examples/node-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/ChoroplethLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function mouseover({ target }) {
let geojsonItem = target.feature.properties
let item = this.geojsonData.data.find(
x => x[this.idKey] === geojsonItem[this.geojsonIdKey]
x => x[this.idKey] == geojsonItem[this.geojsonIdKey]
)
if (!item) {
this.currentItem = { name: "", value: 0 }
Expand Down Expand Up @@ -84,7 +84,7 @@ export default {
let itemGeoJSONID = feature.properties[this.geojsonIdKey]
let color = "NONE"
const {data} = this.geojsonData
let item = data.find(x => x[this.idKey] === itemGeoJSONID)
let item = data.find(x => x[this.idKey] == itemGeoJSONID)
if (!item) {
return {
color: "white",
Expand Down

0 comments on commit 80b6e68

Please # to comment.