Skip to content

Commit fe6cb98

Browse files
committed
fix(scf): filter trigger
1 parent fc72906 commit fe6cb98

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/modules/scf/index.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,14 @@ class Scf {
210210
const { triggerKey } = triggerClass.formatInputs(this.region, funcInfo, event[Type]);
211211
for (let i = 0; i < oldList.length; i++) {
212212
const curOld = oldList[i];
213-
const oldTriggerClass = TRIGGERS[curOld.Type];
214-
const oldKey = oldTriggerClass.getKey(curOld);
215-
if (oldKey === triggerKey) {
216-
deleteList[i] = null;
217-
createList[index] = null;
218-
updateList.push(createList[index]);
213+
if (curOld.Type === Type) {
214+
const oldTriggerClass = TRIGGERS[curOld.Type];
215+
const oldKey = oldTriggerClass.getKey(curOld);
216+
if (oldKey === triggerKey) {
217+
deleteList[i] = null;
218+
createList[index] = null;
219+
updateList.push(createList[index]);
220+
}
219221
}
220222
}
221223
}

0 commit comments

Comments
 (0)