CartoDB / carto.js

CartoDB javascript library
BSD 3-Clause "New" or "Revised" License
424 stars 264 forks source link

Return a new instance of source filters array #2248

Open jesusbotella opened 4 years ago

jesusbotella commented 4 years ago

This PR modifies getFilters() method return value, given that there might be some incorrect behaviours when reusing that original array.

@oriolbx has found a bug when trying to remove filters from the source with source.getFilters() didn't work properly because we were modifying the same array.

Mmoncadaisla commented 3 years ago

@VictorVelarde this issue recently came up in Support and it'd be great if this fix could be applied, do you think it'd be feasible to implement this? cc @pablomoniz