浏览代码

better check for arrays in markdown plugin

Hakim El Hattab 11 年之前
父节点
当前提交
942724238f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugin/markdown/markdown.js

+ 1 - 1
plugin/markdown/markdown.js

@@ -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 ) {