Skip to content

Commit a363551

Browse files
committed
Tighten up further
1 parent 5ce2e7c commit a363551

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/workflow/src/internals.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,9 @@ export class Activator implements ActivationHandler {
662662
// These are caught elsewhere and fail the corresponding activation.
663663
const doUpdateImpl = async () => {
664664
let input: UpdateInput;
665-
const entry = this.updateHandlers.get(name);
665+
const entry = this.updateHandlers.get(name)!;
666666
try {
667-
if (runValidator && entry?.validator) {
667+
if (runValidator && entry.validator) {
668668
const validate = composeInterceptors(
669669
this.interceptors.inbound,
670670
'validateUpdate',
@@ -679,9 +679,6 @@ export class Activator implements ActivationHandler {
679679
}
680680
this.acceptUpdate(protocolInstanceId);
681681
const execute = composeInterceptors(this.interceptors.inbound, 'handleUpdate', this.updateNextHandler.bind(this));
682-
if (!entry) {
683-
return Promise.reject(new IllegalStateError(`No registered update handler for update: ${name}`));
684-
}
685682
const { unfinishedPolicy } = entry;
686683
this.inProgressUpdates.set(updateId, { name, unfinishedPolicy, id: updateId });
687684
const res = execute(input)

0 commit comments

Comments
 (0)