From 6b2f291122b8938ee87f0bbc6896441a5b7b6129 Mon Sep 17 00:00:00 2001 From: guillee3 <138794725+guillee3@users.noreply.github.com> Date: Sun, 1 Jun 2025 15:02:46 +0200 Subject: [PATCH] Fixed validation in ODCheckerCustomStructure_UniqueIdArray to reject string inputs. --- src/core/api/modules/checker.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/api/modules/checker.ts b/src/core/api/modules/checker.ts index 14b397b..616e67f 100644 --- a/src/core/api/modules/checker.ts +++ b/src/core/api/modules/checker.ts @@ -1398,10 +1398,13 @@ export class ODCheckerCustomStructure_UniqueIdArray extends ODCheckerArrayStruct let localQuit = false value.forEach((id,index) => { - if (typeof id != "string") return const localLt = checker.locationTraceDeref(lt) localLt.push(index) - if (uniqueArray.includes(id)){ + if (typeof id != "string") { + //id isn't a string + checker.createMessage("opendiscord:id-invalid-type", "error", "This id needs to be a string!", localLt, null, [], this.id, (this.options.docs ?? null)) + localQuit = true + }else if (uniqueArray.includes(id)) { //exists if (usedScope){ const current: string[] = checker.storage.get(source,usedScope) ?? []