From 32197bd77d079ca77b42340e3c2da6812c9cc174 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 10 Apr 2019 10:09:41 +0200 Subject: [PATCH] fix numeric presence condition --- plugin/highlight/highlight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/highlight/highlight.js b/plugin/highlight/highlight.js index 9dacd6f0..e50676f6 100644 --- a/plugin/highlight/highlight.js +++ b/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; }