diff --git a/packages/types/src/primitive/Generic/ConsensusEngineId.ts b/packages/types/src/primitive/Generic/ConsensusEngineId.ts index 36f30988cc..9f3ebf9ec3 100644 --- a/packages/types/src/primitive/Generic/ConsensusEngineId.ts +++ b/packages/types/src/primitive/Generic/ConsensusEngineId.ts @@ -79,10 +79,12 @@ export default class ConsensusEngineId extends U32 { * @description From the input bytes, decode into an author */ public extractAuthor (bytes: Bytes, sessionValidators: AccountId[]): AccountId | undefined { - if (this.isAura) { - return this.getAuraAuthor(bytes, sessionValidators); - } else if (this.isBabe) { - return this.getBabeAuthor(bytes, sessionValidators); + if (sessionValidators?.length) { + if (this.isAura) { + return this.getAuraAuthor(bytes, sessionValidators); + } else if (this.isBabe) { + return this.getBabeAuthor(bytes, sessionValidators); + } } return undefined;