diff options
author | theia | 2023-02-02 06:42:51 -0500 |
---|---|---|
committer | theia | 2023-02-02 06:42:51 -0500 |
commit | 7a74781828afc169cd2b076403e77bc4b49c12f5 (patch) | |
tree | 722b322e63da996e1ec578d592da52f6a23ffa95 | |
parent | 67eca331d5cdbd9df5102b4463567f948faefdfd (diff) |
callbacks too generous
-rw-r--r-- | graffiti.js | 6 |
1 files 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 |