diff --git a/backend/services/falukantService.js b/backend/services/falukantService.js index 7b13dc1..031453d 100644 --- a/backend/services/falukantService.js +++ b/backend/services/falukantService.js @@ -5969,7 +5969,10 @@ async function enrichNotificationsWithCharacterNames(notifications) { // parse n.effects if present try { if (n.effects) { - const eff = typeof n.effects === 'string' && n.effects.trim().startsWith('{') ? JSON.parse(n.effects) : n.effects; + let eff = n.effects; + if (typeof eff === 'string') { + eff = JSON.parse(eff); + } collectIds(eff); } } catch (err) { /* ignore */ } @@ -6037,7 +6040,10 @@ async function enrichNotificationsWithCharacterNames(notifications) { try { if (n.effects) { - const eff = typeof n.effects === 'string' && n.effects.trim().startsWith('{') ? JSON.parse(n.effects) : n.effects; + let eff = n.effects; + if (typeof eff === 'string') { + eff = JSON.parse(eff); + } foundId = findFirstId(eff) || foundId; } } catch (err) { /* ignore */ }