[Vuejs]-Array filter not working on page refresh while using vue-router

0👍

I think the problem might be the type strict comparison inside this code (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators) – “puelo”

change this:

this.spaces.filter(aSpace => aSpace.id === this.selectedSpace)

to

this.spaces.filter(aSpace => aSpace.id == this.selectedSpace)

👤Otto

Leave a comment