fix invalid color highlight crashing mentions
This commit is contained in:
parent
bb48d949e1
commit
dbde6e81ff
1 changed files with 1 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ import { hex2rgb } from '../color_convert/color_convert.js'
|
|||
|
||||
const highlightStyle = (prefs) => {
|
||||
if (prefs === undefined) return
|
||||
const { color, type } = prefs
|
||||
const { color = '#FFFFFF', type } = prefs
|
||||
if (typeof color !== 'string') return
|
||||
const rgb = hex2rgb(color)
|
||||
if (rgb == null) return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue