Quellcode durchsuchen

fix: IF condition field path and RSS reader cleanup

- ConditionBuilder: Strip {{...}} template syntax from field paths
  IF conditions use raw paths, not template expressions
- RSS Reader: Remove debug logging
fszontagh vor 6 Monaten
Ursprung
Commit
bd49a05f92
2 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen
  1. 0 2
      nodes/rss/rss-reader.js
  2. 7 0
      webui/src/components/ConditionBuilder.tsx

+ 0 - 2
nodes/rss/rss-reader.js

@@ -255,10 +255,8 @@ function parseRss(xml) {
 
     var itemRegex = /<item[^>]*>([\s\S]*?)<\/item>/gi;
     var match;
-    var itemCount = 0;
     while ((match = itemRegex.exec(channel)) !== null) {
         var itemXml = match[1];
-        itemCount++;
 
         var catArray = xmlGetAllTagContents(itemXml, 'category');
         var categories = [];

+ 7 - 0
webui/src/components/ConditionBuilder.tsx

@@ -68,6 +68,13 @@ export function ConditionBuilder({
   }
 
   const updateCondition = (index: number, updates: Partial<Condition>) => {
+    // Strip {{...}} template syntax from field paths - IF condition uses raw paths
+    if (updates.field) {
+      const match = updates.field.match(/^\{\{(.+)\}\}$/)
+      if (match) {
+        updates.field = match[1]
+      }
+    }
     const updated = conditions.map((c, i) =>
       i === index ? { ...c, ...updates } : c
     )