mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-03 11:05:16 +08:00
ensure that the 'settings' object passed into JS is not empty
This commit is contained in:
@@ -130,6 +130,7 @@ public partial class ScriptGroupProject : ObservableObject
|
||||
{
|
||||
throw new Exception("JS脚本未初始化");
|
||||
}
|
||||
JsScriptSettingsObject ??= new ExpandoObject();
|
||||
await Project.ExecuteAsync(JsScriptSettingsObject);
|
||||
}
|
||||
if (Type == "KeyMouse")
|
||||
|
||||
@@ -100,6 +100,12 @@ public partial class JsListViewModel : ObservableObject, INavigationAware, IView
|
||||
return;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(item.Manifest.SettingsUi))
|
||||
{
|
||||
Toast.Warning("此脚本存在配置,请添加至【调度器】,并右键修改配置后使用!");
|
||||
return;
|
||||
}
|
||||
|
||||
await _scriptService.RunMulti([new ScriptGroupProject(item)]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user