From 681850b9691a1e539f52d20bd440a93423c51e8b Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 26 Apr 2022 14:10:36 +0800 Subject: [PATCH] * Fix bug #15645. --- module/api/js/common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/api/js/common.js b/module/api/js/common.js index 0a18e788bc..d52f04a318 100644 --- a/module/api/js/common.js +++ b/module/api/js/common.js @@ -415,7 +415,10 @@ try { }, del(data, index) { if(data.length <= 1) return; - data.splice(index, 1) + for(let i = index+1; i < data.length; i++){ + if(data[i].sub == data[index].sub) return data.splice(index, i - index) + } + data.splice(index, data.length - index) }, changeType() { if (!this.params[this.structType] || this.params[this.structType].length > 0) {