NYCPlanning / labs-zola

NYC Planning's Zoning and Land Use App
https://zola.planning.nyc.gov
Other
75 stars 26 forks source link

Keep derive EmberArray proxy instead of degrading #1160

Closed allthesignals closed 6 months ago

allthesignals commented 6 months ago

Fixes bug in /data route where attempt was made to call .uniqBy on a plain array.

Originally, we were "degrading" the derived EmberArray to a plain array (.toArray()). This used to work because Ember prototype extensions were still a thing. But those are no more.

Originally .toArray may have been used by force of habit or some vestigial reason.

This change removes the .toArray call and keeps the derived EmberArray proxy which includes the .uniqBy method.

netlify[bot] commented 6 months ago

Deploy Preview for labs-zola failed.

Name Link
Latest commit f816f68bb460b378ec90df893ffd804e02fb2cf2
Latest deploy log https://app.netlify.com/sites/labs-zola/deploys/65707b63a875720008326577