nodebb-plugin-ezoic-infinite 1.7.40 → 1.7.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/library.js +7 -1
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -12,7 +12,13 @@ const plugin = {};
12
12
  function normalizeExcludedGroups(value) {
13
13
  if (!value) return [];
14
14
  if (Array.isArray(value)) return value;
15
- return String(value).split(',').map(s => s.trim()).filter(Boolean);
15
+ // NodeBB stocke les settings multi-valeurs comme string JSON "[\"group1\",\"group2\"]"
16
+ const s = String(value).trim();
17
+ if (s.startsWith('[')) {
18
+ try { const parsed = JSON.parse(s); if (Array.isArray(parsed)) return parsed.map(String).filter(Boolean); } catch (_) {}
19
+ }
20
+ // Fallback : séparation par virgule
21
+ return s.split(',').map(v => v.trim()).filter(Boolean);
16
22
  }
17
23
 
18
24
  function parseBool(v, def = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.7.40",
3
+ "version": "1.7.41",
4
4
  "description": "Production-ready Ezoic infinite ads integration for NodeBB 4.x",
5
5
  "main": "library.js",
6
6
  "license": "MIT",