Validate pageId before adding labels

This commit is contained in:
Hongbo Wu 2022-11-23 10:41:02 +08:00
parent 5f07f8cc64
commit ce00274911

View file

@ -135,8 +135,8 @@ export const triggerActions = async (
for (const action of rule.actions) {
switch (action.type) {
case RuleActionType.AddLabel:
if (action.params.length === 0) {
console.log('No label id provided')
if (!data.id || action.params.length === 0) {
console.log('invalid data for add label action')
continue
}
await addLabels(