From c9aff0ac92c3aea78645e10787d52df8b1d0777d Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Tue, 1 Mar 2016 12:06:01 +0800 Subject: [PATCH] fix: should support nested list --- site/component/utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/component/utils.js b/site/component/utils.js index 6be0c81975..a6efaf68e6 100644 --- a/site/component/utils.js +++ b/site/component/utils.js @@ -5,6 +5,10 @@ import { Menu } from '../../'; export function objectToComponent(object, index) { if (object === null) return; + if (typeof object === 'string') { + return { object }; + } + const children = object.children; if (object.type === 'html') {