Explorar o código

fix numeric presence condition

Hakim El Hattab %!s(int64=6) %!d(string=hai) anos
pai
achega
32197bd77d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      plugin/highlight/highlight.js

+ 1 - 1
plugin/highlight/highlight.js

@@ -141,7 +141,7 @@ c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{b:/\{/,e:/\}/,i:/:/}]}});
 						block.parentNode.appendChild( fragmentBlock );
 						RevealHighlight.highlightLines( fragmentBlock );
 
-						if( fragmentIndex ) {
+						if( typeof fragmentIndex === 'number' ) {
 							fragmentBlock.setAttribute( 'data-fragment-index', fragmentIndex );
 							fragmentIndex += 1;
 						}