From a4f566dc397b8368e0a559cb501a8d931100e4bd Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 22 Aug 2024 22:26:32 +0300 Subject: [PATCH] Fix getTagKey when charId can be a string --- public/scripts/tags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/tags.js b/public/scripts/tags.js index fcdd0b67d..c56e0d1cb 100644 --- a/public/scripts/tags.js +++ b/public/scripts/tags.js @@ -447,7 +447,7 @@ export function getTagKeyForEntity(entityOrKey) { // Next lets check if its a valid character or character id, so we can swith it to its tag let character; if (!character && characters.indexOf(x) >= 0) character = x; // Check for char object - if (!character && typeof x === 'number') character = characters[x]; // check if its a char id + if (!character && !isNaN(parseInt(entityOrKey))) character = characters[x]; // check if its a char id if (!character) character = characters.find(y => y.avatar === x); // check if its a char key if (character) {