diff --git a/src/SopHelper.App/VVMs/RecipeEditor/EditorNodes.cs b/src/SopHelper.App/VVMs/RecipeEditor/EditorNodes.cs
index 8b8fbad..59645df 100644
--- a/src/SopHelper.App/VVMs/RecipeEditor/EditorNodes.cs
+++ b/src/SopHelper.App/VVMs/RecipeEditor/EditorNodes.cs
@@ -779,7 +779,8 @@ public class StepNode : EditorNode
private string _description = "";
private int _timeout;
private int _standardDurationMs;
- private ConditionNode? _detection;
+ // 即使 YAML 没有 detection,也保留可编辑对象,供界面写入新选择的方法。
+ private ConditionNode? _detection = new();
/// 步骤号(执行顺序按它升序)
public int Id
diff --git a/src/SopHelper.App/VVMs/RecipeEditor/RecipeEditor.xaml b/src/SopHelper.App/VVMs/RecipeEditor/RecipeEditor.xaml
index 1a8f460..07c47bb 100644
--- a/src/SopHelper.App/VVMs/RecipeEditor/RecipeEditor.xaml
+++ b/src/SopHelper.App/VVMs/RecipeEditor/RecipeEditor.xaml
@@ -230,7 +230,7 @@
-
+