Skip to content

Commit

Permalink
fix: handle empty elements
Browse files Browse the repository at this point in the history
  • Loading branch information
SaarChaffee committed Mar 18, 2024
1 parent fafcc8e commit ab88b3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/arena/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export function apply(ctx: Context, config: Config) {
ctx.logger.debug(elemnts)
ctx.logger.debug(prefix)

if (!elemnts || !elemnts.length) {
return next()
}
if (elemnts[0].type === 'at' && elemnts[0].attrs?.id === selfId) {
elemnts.shift()
}
Expand Down

0 comments on commit ab88b3e

Please sign in to comment.