Gapminder / tools-page

Gapminder tools page vanilla
8 stars 5 forks source link

Destructing a marker results in error #194

Closed angiehjort closed 3 years ago

angiehjort commented 3 years ago

Switch from one tool to another on tools page and then to the third tool before the second one loads (double click a card at the bottom like a boomer)

error: Cannot read property 'keys' of undefined at findConceptForSpace

image

resolveRef(this.config.data): ref: {transform: "entityConceptSkipFilter", model: "markers.mountain.encoding.color"}

transformModel(): model.data.config = concept: "world_4region" space: ["country"]

findConceptForSpace() const filteredConcepts = [...availability.keyValueLookup.get(createKeyStr(space)).keys()]

space = ["country"] availability.keyValueLookup = Map(0)

jheeffer commented 3 years ago

Probably fixed with https://github.com/vizabi/vizabi-reactive/commit/35346b93e9a19fed223efcad65fa070530ba2da2 and https://github.com/vizabi/vizabi-shared-components/commit/c85f914db099b5598d8a5180c6b9c0b21235104b

You can probably safely remove the call to marker.destruct from tool code to clean it up.