mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-13 02:25:48 +01:00
Fix styles cleanup issue.
This commit is contained in:
@@ -111,8 +111,10 @@ var Hive = Class("Hive", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
cleanup: function cleanup() {
|
cleanup: function cleanup() {
|
||||||
for (let sheet in values(this.sheets))
|
for (let sheet of this.sheets)
|
||||||
sheet.enabled = false;
|
util.trapErrors(() => {
|
||||||
|
sheet.enabled = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
__iterator__: function () Iterator(this.sheets),
|
__iterator__: function () Iterator(this.sheets),
|
||||||
@@ -137,8 +139,12 @@ var Hive = Class("Hive", {
|
|||||||
*/
|
*/
|
||||||
add: function add(name, filter, css, agent, lazy) {
|
add: function add(name, filter, css, agent, lazy) {
|
||||||
|
|
||||||
if (!isArray(filter))
|
if (isArray(filter))
|
||||||
|
// Need an array from the same compartment.
|
||||||
|
filter = Array.slice(filter);
|
||||||
|
else
|
||||||
filter = filter.split(",");
|
filter = filter.split(",");
|
||||||
|
|
||||||
if (name && name in this.names) {
|
if (name && name in this.names) {
|
||||||
var sheet = this.names[name];
|
var sheet = this.names[name];
|
||||||
sheet.agent = agent;
|
sheet.agent = agent;
|
||||||
|
|||||||
Reference in New Issue
Block a user