@@ -339,19 +339,22 @@ function getCursorIcon({
339339 return getIcon ( "natural" ) ;
340340 }
341341 } ) ( ) ;
342- const accidentalDiv = document . createElement ( "div" ) ;
343- accidentalDiv . innerHTML = accidentalSvg ;
344- const svgEl = accidentalDiv . querySelector ( "svg" ) ;
345- if ( svgEl )
346- Object . assign ( svgEl . style , {
347- position : "absolute" ,
348- right : `${ size * 0.65 } px` ,
349- top : `${ size * 0.35 } px` ,
350- height : `${ size * 0.7 } px` ,
351- width : `${ size * 0.7 } px` ,
352- color : cursorIconColor ,
353- } ) ;
354- div . appendChild ( accidentalDiv ) ;
342+ // TODO add other accidental icons and remove if statement
343+ if ( accidentalSvg ) {
344+ const accidentalDiv = document . createElement ( "div" ) ;
345+ accidentalDiv . innerHTML = accidentalSvg ;
346+ const svgEl = accidentalDiv . querySelector ( "svg" ) ;
347+ if ( svgEl )
348+ Object . assign ( svgEl . style , {
349+ position : "absolute" ,
350+ right : `${ size * 0.65 } px` ,
351+ top : `${ size * 0.35 } px` ,
352+ height : `${ size * 0.7 } px` ,
353+ width : `${ size * 0.7 } px` ,
354+ color : cursorIconColor ,
355+ } ) ;
356+ div . appendChild ( accidentalDiv ) ;
357+ }
355358 }
356359 if ( dotted ) {
357360 const dotDiv = document . createElement ( "div" ) ;
0 commit comments