🐛 修复无法编辑已创建服务监控

This commit is contained in:
naiba
2021-04-22 22:18:55 +08:00
parent 585cf538d0
commit b69b069f27
6 changed files with 15 additions and 15 deletions

View File

@@ -201,8 +201,8 @@ function addOrEditMonitor(monitor) {
}
var servers;
if (monitor) {
servers = monitor.SkipServersRaw || "[]";
const serverList = JSON.parse(servers);
servers = monitor.SkipServersRaw;
const serverList = JSON.parse(servers || "[]");
const node = modal.find("i.dropdown.icon");
for (let i = 0; i < serverList.length; i++) {
node.after(
@@ -237,7 +237,7 @@ function addOrEditCron(cron) {
var servers;
if (cron) {
servers = cron.ServersRaw;
const serverList = JSON.parse(servers);
const serverList = JSON.parse(servers || "[]");
const node = modal.find("i.dropdown.icon");
for (let i = 0; i < serverList.length; i++) {
node.after(