cancel the pending enforce on unload
This commit is contained in:
1 parent
4de8def0bb
commit
697966deff
1 file changed
+3
@@ -17,6 +17,9 @@ module.exports = class RibbonClasp extends Plugin {
|
|||||||
|
|
||||||
onunload() {
|
onunload() {
|
||||||
this.observer?.disconnect();
|
this.observer?.disconnect();
|
||||||
|
// disconnect doesn't stop an already-scheduled call
|
||||||
|
this.debouncedEnforce?.cancel();
|
||||||
|
|
||||||
const ribbon = this.getRibbon();
|
const ribbon = this.getRibbon();
|
||||||
if (ribbon && this.originalOnChange) {
|
if (ribbon && this.originalOnChange) {
|
||||||
ribbon.onChange = this.originalOnChange;
|
ribbon.onChange = this.originalOnChange;
|
||||||
|
|||||||
Reference in new issue
Block a user