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:
parent
37237c47a6
commit
161b084626
2 changed files with 4 additions and 2 deletions
|
@ -224,7 +224,7 @@ export default class Directory extends SiteModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( inst.ffz_uptime_el ) {
|
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_el = null;
|
||||||
inst.ffz_uptime_span = null;
|
inst.ffz_uptime_span = null;
|
||||||
inst.ffz_uptime_tt = null;
|
inst.ffz_uptime_tt = null;
|
||||||
|
|
|
@ -155,7 +155,9 @@ export class ManagedStyle {
|
||||||
delete(key) {
|
delete(key) {
|
||||||
const block = this._blocks[key];
|
const block = this._blocks[key];
|
||||||
if ( block ) {
|
if ( block ) {
|
||||||
this._style.removeChild(block);
|
if ( this._style.contains(block) )
|
||||||
|
this._style.removeChild(block);
|
||||||
|
|
||||||
this._blocks[key] = null;
|
this._blocks[key] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue