Fix broken tag selector with colored tags that differ with normalization
https://forums.zotero.org/discussion/96138/lost-content-in-tag-selector An entered character from the CJK_COMPATIBILITY_IDEOGRAPHS block (char code 63834, or similar) was normalized to the CJK_UNIFIED_IDEOGRAPHS block (char code 35712), which then caused an expected key not to exist. To fix, normalize colored tag values coming from the DB.
This commit is contained in:
parent
2112aa7271
commit
0df8b7670d
1 changed files with 3 additions and 1 deletions
|
@ -591,6 +591,8 @@ Zotero.Tags = new function() {
|
|||
}
|
||||
|
||||
var tagColors = Zotero.SyncedSettings.get(libraryID, 'tagColors') || [];
|
||||
// Normalize tags from DB, which might not have been normalized properly previously
|
||||
tagColors.forEach(x => x.name = x.name.normalize());
|
||||
_libraryColors[libraryID] = tagColors;
|
||||
_libraryColorsByName[libraryID] = new Map;
|
||||
|
||||
|
@ -619,7 +621,7 @@ Zotero.Tags = new function() {
|
|||
this.getColors(libraryID);
|
||||
var tagColors = _libraryColors[libraryID];
|
||||
|
||||
name = name.trim();
|
||||
name = name.trim().normalize();
|
||||
|
||||
// Unset
|
||||
if (!color) {
|
||||
|
|
Loading…
Reference in a new issue