Add highlighter try-catch
This commit is contained in:
@@ -5,6 +5,8 @@ type HighlightInt = [Range, HighlightType]
|
|||||||
let highLights = new Map<number, HighlightInt[]>();
|
let highLights = new Map<number, HighlightInt[]>();
|
||||||
|
|
||||||
export const highlighter = (highlightDom:HTMLElement, id:number) => {
|
export const highlighter = (highlightDom:HTMLElement, id:number) => {
|
||||||
|
try {
|
||||||
|
|
||||||
if(highlightDom){
|
if(highlightDom){
|
||||||
if(!CSS.highlights){
|
if(!CSS.highlights){
|
||||||
return
|
return
|
||||||
@@ -48,6 +50,9 @@ export const highlighter = (highlightDom:HTMLElement, id:number) => {
|
|||||||
|
|
||||||
runHighlight()
|
runHighlight()
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const runHighlight = () => {
|
const runHighlight = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user