Update: Set Panel._originalAddToPanelBox to undefined on disable

Clean up more on disable by setting `Panel._originalAddToPanelBox` to
`undefined`.
This commit is contained in:
Julian 2021-06-19 22:47:07 +02:00
parent cc2098b597
commit 569fc6a683
Signed by: julian
GPG Key ID: 094C2AC34192FA11

View File

@ -85,6 +85,8 @@ class Extension {
disable() { disable() {
// Revert the overwrite of `Panel._addToPanelBox`. // Revert the overwrite of `Panel._addToPanelBox`.
Panel.Panel.prototype._addToPanelBox = Panel.Panel.prototype._originalAddToPanelBox; Panel.Panel.prototype._addToPanelBox = Panel.Panel.prototype._originalAddToPanelBox;
// Set `Panel._originalAddToPanelBox` to `undefined`.
Panel._originalAddToPanelBox = undefined;
// Disconnect signals. // Disconnect signals.
for (const handlerId of this._settingsHandlerIds) { for (const handlerId of this._settingsHandlerIds) {