mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-17 18:22:30 +02:00
Fix spurious sanitizations. Closes issue #548.
This commit is contained in:
1 parent
8459d93e0b
commit
015620921a
1 file changed
+3
-1
@@ -233,6 +233,8 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
}
|
||||
},
|
||||
|
||||
firstRun: 0,
|
||||
|
||||
addItem: function addItem(name, params) {
|
||||
let item = this.itemMap[name] || Item(name, params);
|
||||
this.itemMap[name] = item;
|
||||
@@ -379,7 +381,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
}
|
||||
}, {
|
||||
load: function (dactyl, modules, window) {
|
||||
if (sanitizer.runAtShutdown && !sanitizer.ranAtShutdown)
|
||||
if (!sanitizer.firstRun++ && sanitizer.runAtShutdown && !sanitizer.ranAtShutdown)
|
||||
sanitizer.sanitizeItems(null, Range(), null, "shutdown");
|
||||
sanitizer.ranAtShutdown = false;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user