@@ -383,7 +383,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
383383 return sortAscending ( b , a ) ;
384384 }
385385
386- function clearArrows ( arrowUp = "▲" , arrowDown = "▼" ) {
386+ function clearArrows ( arrowUp , arrowDown , initialArrow = "↕" ) {
387+ th . innerHTML = th . innerHTML . replace ( initialArrow , "" ) ;
387388 th . innerHTML = th . innerHTML . replace ( arrowUp , "" ) ;
388389 th . innerHTML = th . innerHTML . replace ( arrowDown , "" ) ;
389390 }
@@ -515,13 +516,12 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
515516 columnIndexesClicked
516517 ) {
517518 const desc = th . classList . contains ( "order-by-desc" ) ;
518- const arrow = { up : " ▲" , down : " ▼" } ;
519+ const initialArrow = " ↕" ;
520+ const arrow = { up : " ↑" , down : " ↓" } ;
519521 const fillValue = "!X!Y!Z!" ;
520522
521- if ( desc && table . hasClass . tableArrows ) {
522- th . insertAdjacentText ( "beforeend" , arrow . down ) ;
523- } else if ( table . hasClass . tableArrows ) {
524- th . insertAdjacentText ( "beforeend" , arrow . up ) ;
523+ if ( table . hasClass . tableArrows ) {
524+ th . insertAdjacentText ( "beforeend" , initialArrow ) ;
525525 }
526526
527527 let timesClickedColumn = 0 ;
0 commit comments