From edef20d1715ffb4b09ed36bbab9866d2146d6a5a Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Wed, 18 Nov 2020 21:09:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=BA=90=E7=AE=A1=E7=90=86=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E4=BA=A6=E5=8F=AF=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EditSites.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/EditSites.vue b/src/components/EditSites.vue index 88c7e0b..6d25378 100644 --- a/src/components/EditSites.vue +++ b/src/components/EditSites.vue @@ -314,7 +314,7 @@ export default { var randomstring = require('randomstring') var doc = { key: this.dialogType === 'edit' ? this.siteInfo.key : this.siteInfo.key ? this.siteInfo.key : randomstring.generate(6), - id: this.dialogType === 'edit' ? this.siteInfo.id : this.sites[this.sites.length - 1].id + 1, + id: this.dialogType === 'edit' ? this.siteInfo.id : this.sites.length ? this.sites[this.sites.length - 1].id + 1 : 1, name: this.siteInfo.name, api: this.siteInfo.api, download: this.siteInfo.download,