mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
fix: array access error when token.map is null, fix #3123
This commit is contained in:
@@ -289,7 +289,9 @@ class Markdown {
|
||||
case 'list_item_open':
|
||||
case 'paragraph_open':
|
||||
case 'table_open':
|
||||
token.attrPush(['data-line', token.map[0]])
|
||||
if (token.map) {
|
||||
token.attrPush(['data-line', token.map[0]])
|
||||
}
|
||||
}
|
||||
})
|
||||
const result = originalRender.call(this.md.renderer, tokens, options, env)
|
||||
|
||||
Reference in New Issue
Block a user