Skip to content

Commit

Permalink
fix: 修复 ajax 动作不阻塞后续动作的问题 Close: #11457 (#11555)
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop authored Feb 6, 2025
1 parent 73fc1cc commit 42b0d75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions packages/amis-core/src/actions/AjaxAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ export class AjaxAction implements RendererAction {
env.notify('error', e.message);
}
}

// 不阻塞后面执行
// throw e;
throw e;
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions packages/amis-core/src/actions/CmptAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ export class CmptAction implements RendererAction {
// 如果key指定了,但是没找到组件,则报错
if (key && !component) {
const msg = `尝试执行一个不存在的目标组件动作(${key}),请检查目标组件非隐藏状态,且正确指定了componentId或componentName`;
if (action.ignoreError === false) {
throw Error(msg);
} else {
console.warn(msg);
}
throw Error(msg);
}

if (action.actionType === 'setValue') {
Expand Down

0 comments on commit 42b0d75

Please sign in to comment.