Skip to content
Snippets Groups Projects
Commit 94272423 authored by Hakim El Hattab's avatar Hakim El Hattab
Browse files

better check for arrays in markdown plugin

parent f8fed135
No related merge requests found
......@@ -171,7 +171,7 @@
// flatten the hierarchical stack, and insert <section data-markdown> tags
for( var i = 0, len = sectionStack.length; i < len; i++ ) {
// vertical
if( sectionStack[i].propertyIsEnumerable( 'length' ) && typeof sectionStack[i].splice === 'function' ) {
if( sectionStack[i] instanceof Array ) {
markdownSections += '<section '+ options.attributes +'>';
sectionStack[i].forEach( function( child ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment