1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-07 23:00:54 +00:00

Fix a leak in the new metadata stuff with pop-ups. Fix the click handler for metadata not getting the most recent data.

This commit is contained in:
SirStendec 2017-12-04 21:37:26 -05:00
parent e224800fb9
commit c3ec40b8ea

View file

@ -239,7 +239,10 @@ export default class Metadata extends Module {
if ( el.popper )
el.popper.destroy();
el.tooltip = el.popper = null;
if ( el._ffz_destroy )
el._ffz_destroy();
el._ffz_destroy = el.tooltip = el.popper = null;
el.remove();
}
};
@ -322,7 +325,7 @@ export default class Metadata extends Module {
if ( btn.disabled || btn.classList.contains('disabled') || el.disabled || el.classList.contains('disabled') )
return false;
def.click.call(this, data, e, () => refresh_fn(key));
def.click.call(this, el._ffz_data, e, () => refresh_fn(key));
});
if ( def.popup )