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