From 1247896d70c5c8aa3e8ff13cd4d28e8910368f81 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 13 Jul 2017 01:16:29 -0400 Subject: [PATCH] Fix crash from tag name collision with Object properties in tag selector --- .../content/zotero/bindings/tagselector.xml | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml index 3290318d59..4264e5b2cb 100644 --- a/chrome/content/zotero/bindings/tagselector.xml +++ b/chrome/content/zotero/bindings/tagselector.xml @@ -121,23 +121,25 @@ false null - + { + this._scope.forEach(function (types, name) { + tags.push(...types.map(type => { return { tag: name, - type: type + type }; })); - } + }); let { div, emptyRegular } = this.createTagsList(tags); tagsBox.replaceChild(div, tagsBox.firstChild); this._emptyRegular = emptyRegular; @@ -944,7 +946,7 @@ // Check tags against scope if (this._hasScope) { - var inScope = !!this._scope[name]; + var inScope = this._scope.has(name); } // If not in search, hide