You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code currently creates a window.__powerCalendars hash, and fills it as you create more instances of power-calendar.
However if the last instance of power-calendar is destroyed, it will still leave an empty hash. The unregisterCalendar hook could check Object.keys(window.__powerCalendars).length and delete the property from window if there are no more entries.
This would prevent power-calendar from tripping QUnit's useful "Check for Globals" feature, which detects global state leaks like this.
Any code checking the hash will also need to first check that the hash exists.
The text was updated successfully, but these errors were encountered:
The code currently creates a
window.__powerCalendars
hash, and fills it as you create more instances of power-calendar.However if the last instance of power-calendar is destroyed, it will still leave an empty hash. The
unregisterCalendar
hook could checkObject.keys(window.__powerCalendars).length
and delete the property fromwindow
if there are no more entries.This would prevent power-calendar from tripping QUnit's useful "Check for Globals" feature, which detects global state leaks like this.
Any code checking the hash will also need to first check that the hash exists.
The text was updated successfully, but these errors were encountered: