From 7a74781828afc169cd2b076403e77bc4b49c12f5 Mon Sep 17 00:00:00 2001 From: theia Date: Thu, 2 Feb 2023 06:42:51 -0500 Subject: callbacks too generous --- graffiti.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/graffiti.js b/graffiti.js index 9b92b4f..8875f8d 100644 --- a/graffiti.js +++ b/graffiti.js @@ -123,7 +123,8 @@ export default class { const uuid = this.#objectUUID(object) let originalObject = null - for (const tag in this.tagMap) { + for (const tag of object._tags) { + if (!(tag in this.tagMap)) continue const objectMap = this.tagMap[tag].objectMap if (uuid in objectMap) { @@ -153,7 +154,8 @@ export default class { const uuid = this.#objectUUID(object) let originalObject = null - for (const tag in this.tagMap) { + for (const tag of object._tags) { + if (!(tag in this.tagMap)) continue const objectMap = this.tagMap[tag].objectMap if (!(uuid in objectMap)) return -- cgit v1.2.3-70-g09d2