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

Stop using thing.parentElement.removeChild(thing). Also make sure the block exists in ManagedStyles before we remove it.

This commit is contained in:
SirStendec 2018-04-19 16:39:16 -04:00
parent 37237c47a6
commit 161b084626
2 changed files with 4 additions and 2 deletions

View file

@ -224,7 +224,7 @@ export default class Directory extends SiteModule {
}
if ( inst.ffz_uptime_el ) {
inst.ffz_uptime_el.parentElement.removeChild(inst.ffz_uptime_el);
inst.ffz_uptime_el.remove();
inst.ffz_uptime_el = null;
inst.ffz_uptime_span = null;
inst.ffz_uptime_tt = null;

View file

@ -155,7 +155,9 @@ export class ManagedStyle {
delete(key) {
const block = this._blocks[key];
if ( block ) {
if ( this._style.contains(block) )
this._style.removeChild(block);
this._blocks[key] = null;
}
}