diff options
Diffstat (limited to 'background/patterns_query_manager.js')
-rw-r--r-- | background/patterns_query_manager.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/background/patterns_query_manager.js b/background/patterns_query_manager.js index 9de9d35..3e2953f 100644 --- a/background/patterns_query_manager.js +++ b/background/patterns_query_manager.js @@ -99,7 +99,7 @@ if (this.haketilo_content_script_main) function register(kind, object) { if (kind === "mappings") { - for (const [pattern, resource] of Object.entries(object.payloads)) + for (const [pattern, resource] of Object.entries(object.payloads || {})) pqt.register(tree, pattern, object.identifier, resource); } else /* if (kind === "blocking") */ { /* @@ -120,7 +120,7 @@ function changed(kind, change) { const old_version = currently_registered.get(change.key); if (old_version !== undefined) { if (kind === "mappings") { - for (const pattern in old_version.payloads) + for (const pattern in old_version.payloads || {}) pqt.deregister(tree, pattern, change.key); } else /* if (kind === "blocking") */ { pqt.deregister(tree, change.key, "~allow"); |