Skip to content

Commit

Permalink
Default to empty HTML attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
afcapel committed Mar 12, 2024
1 parent d631450 commit 54a8cd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trix/views/block_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default class BlockView extends ObjectView {
let className
const attributeName = this.attributes[depth]

const { tagName, htmlAttributes } = getBlockConfig(attributeName)
const { tagName, htmlAttributes = [] } = getBlockConfig(attributeName)

if (depth === 0 && this.block.isRTL()) {
Object.assign(attributes, { dir: "rtl" })
}
Expand Down

0 comments on commit 54a8cd0

Please sign in to comment.