From 0e8ef2ad750a673aacde2f57ca8b82f2392127fb Mon Sep 17 00:00:00 2001 From: Miika Alonen Date: Tue, 12 Dec 2023 02:48:18 +0200 Subject: [PATCH] Less error logging for zifferjs --- src/API.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/API.ts b/src/API.ts index 6d5bfa1..78904c0 100644 --- a/src/API.ts +++ b/src/API.ts @@ -723,7 +723,6 @@ export class UserAPI { const key = id === "" ? this.generateCacheKey(input, options) : zid; const validSyntax = typeof input === "string" && !this.invalidPatterns[input] - if(!validSyntax) this.app.api.log(`Invalid syntax: ${input}`); let player; let replace = false; @@ -750,6 +749,10 @@ export class UserAPI { if(player) { + if(player.atTheBeginning()) { + if(!validSyntax) this.app.api.log(`Invalid syntax: ${input}`); + } + if (player.ziffers.generator && player.ziffers.generatorDone) { this.removePatternFromCache(key); }