globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 605 forks source link

Fix leaking handler in date format setup #806

Closed SlexAxton closed 6 years ago

SlexAxton commented 6 years ago

A coworker of mine patched this locally because we were experiencing progressive slow-downs the more we rendered certain pages with lots of dates.

They are adding and removing an event listener from cldr when we pass in options.timeZone, but since they are constructing the listener with a generator function, they aren't actually removing the one they added. I'll see if I can modify this function and check if that fixes it.

<3z, Alex

jsf-clabot commented 6 years ago

CLA assistant check
All committers have signed the CLA.

rxaviers commented 6 years ago

Thanks! ❤️

rxaviers commented 6 years ago

Published in https://github.com/globalizejs/globalize/releases/tag/1.4.0-alpha.1