Zotero.PreferencePanes: Fix shutdown observer error (#2845)
`this` referred to the observer instead of Zotero.PreferencePanes, so `this.pluginPanes.length` caused an error and plugin panes were not removed.
This commit is contained in:
parent
ccc94e7b45
commit
93666d310e
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ Zotero.PreferencePanes = {
|
|||
}
|
||||
|
||||
Zotero.Plugins.addObserver({
|
||||
shutdown({ id: pluginID }) {
|
||||
shutdown: ({ id: pluginID }) => {
|
||||
let beforeLength = this.pluginPanes.length;
|
||||
this.pluginPanes = this.pluginPanes.filter(pane => pane.pluginID !== pluginID);
|
||||
if (this.pluginPanes.length !== beforeLength) {
|
||||
|
|
Loading…
Add table
Reference in a new issue