Skip to content

Commit

Permalink
fix: lastErrorMessage error
Browse files Browse the repository at this point in the history
  • Loading branch information
ppedziwiatr committed Aug 28, 2023
1 parent 4995d09 commit 495afe6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/modules/impl/handler/AbstractContractHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ export abstract class AbstractContractHandler<State> implements HandlerApi<State
const lastErrorKey = errorKeys[errorKeys.length - 1] as string;
const lastErrorMessage = stateWithValidity?.cachedValue?.errorMessages[lastErrorKey];
// don't judge me..
if (lastErrorMessage.startsWith('[SkipUnsafeError]')) {
// FIXME: also - '?' is stinky...
if (lastErrorMessage?.startsWith('[SkipUnsafeError]')) {
throw new ContractError(lastErrorMessage);
}
}
Expand Down

0 comments on commit 495afe6

Please sign in to comment.