From 40b31e1fe0e50de8f485a8c46b3f9b3eb0313757 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 25 Feb 2024 11:54:13 +0000 Subject: [PATCH] improved `initialize()` inside `PresetController` --- project/src/controllers/PresetController.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/project/src/controllers/PresetController.ts b/project/src/controllers/PresetController.ts index a3365ebc..2989249c 100644 --- a/project/src/controllers/PresetController.ts +++ b/project/src/controllers/PresetController.ts @@ -22,9 +22,14 @@ export class PresetController for (const [id, preset] of presets) { - if (id != preset._id) + if (id !== preset._id) { - this.logger.error(`Preset for template '${preset._items[0]._tpl}' has invalid id (${id} != ${preset._id}). Skipping`); + this.logger.error( + `Preset for template tpl: '${ + preset._items[0]._tpl + } ${preset._name}' has invalid key: (${id} != ${preset._id}). Skipping`, + ); + continue; }