1
0
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:
hikerpig
2019-07-24 23:49:07 +08:00
committed by Junyoung Choi
parent 7797661489
commit 972d053c83
5 changed files with 30 additions and 2 deletions

View File

@@ -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)