fix invalid color highlight crashing mentions

This commit is contained in:
Henry Jameson 2026-04-22 17:26:39 +03:00
commit dbde6e81ff

View file

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