From 2234c8dff1605c9e81c583faee41ee9f67619555 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 31 Dec 2018 02:14:22 +0300 Subject: [PATCH] minor tweaks... Signed-off-by: Alex A. Naanou --- ui (gen4)/imagegrid/tags.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui (gen4)/imagegrid/tags.js b/ui (gen4)/imagegrid/tags.js index 58fc7e36..821add2f 100755 --- a/ui (gen4)/imagegrid/tags.js +++ b/ui (gen4)/imagegrid/tags.js @@ -918,7 +918,7 @@ var BaseTagsPrototype = { // not sure how much performance this actually gains though. hasTag: function(tag){ for(var t of this.tags()){ - if(this.match(tag, t)){ + if(tag == t || this.match(tag, t)){ return true } } return false }, has: function(value){ @@ -1632,7 +1632,9 @@ var BaseTagsPrototype = { // // NOTE: this will touch only longest unique paths (see: .uniquePaths(..)) makePathsPersistent: function(){ - this.persistent = new Set(this.uniquePaths()) + this.persistent = + (this.persistent || new Set()) + .unite(this.uniquePaths()) return this }, // Optimize tags...