From cb4b255b357807715078ad40b2174e35fe60d9d3 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Sun, 7 Jun 2026 21:36:14 +0200 Subject: [PATCH] Fix: Remove remaining static method from inside init() function The getItemValueSC static method was still incorrectly placed inside the init() method, causing 'Unexpected strict mode reserved word' error at line 103. This moves it to the class level with calculateItemValueSC. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- modules/mournblade-cyd2-utility.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/mournblade-cyd2-utility.js b/modules/mournblade-cyd2-utility.js index 2e88dea..4dfdbe9 100644 --- a/modules/mournblade-cyd2-utility.js +++ b/modules/mournblade-cyd2-utility.js @@ -99,14 +99,7 @@ export class MournbladeCYD2Utility { .join(', '); }); - // Helper pour calculer la valeur SC d'un item avec quantité - static getItemValueSC(item) { - const value = this.calculateItemValueSC(item.system?.prixpo, item.system?.prixca, item.system?.prixsc); - const quantity = item.system?.quantite || 1; - return value * quantity; - } - - Handlebars.registerHelper('select', function(value, options) { + Handlebars.registerHelper('select', function(value, options) { const html = options.fn(this); const escaped = String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); return html.replace(new RegExp(`value="${escaped}"`, 'g'), `value="${value}" selected="selected"`);