From 123b453a3cf4195c7a7b0133f740ea568af859a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Mon, 9 Jun 2014 16:08:24 +0200 Subject: [PATCH] editor: small fix --- src/editor/plugins/core/lists.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/editor/plugins/core/lists.js b/src/editor/plugins/core/lists.js index 662dc53..7a9d321 100644 --- a/src/editor/plugins/core/lists.js +++ b/src/editor/plugins/core/lists.js @@ -45,8 +45,9 @@ var toggleListAction = function(type) { item1 = list.object.getItem(0), text = item1 ? item1.contents()[0] : undefined, // doc = boundries.node1.document; - - return doc.createFragment(doc.CaretFragment, {node: text, offset:0}); + if(text) { + return doc.createFragment(doc.CaretFragment, {node: text, offset:0}); + } }, { metadata: { description: action.getState().description, -- 2.20.1