From 220a10480e60b509dc754228ab5a94a8470941e8 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 10 Mar 2012 19:31:25 +0000 Subject: [PATCH] Fixed issue with importing an empty TiddlyWiki document --- js/TiddlerInput.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/TiddlerInput.js b/js/TiddlerInput.js index f0b7995b7..96839c3ad 100755 --- a/js/TiddlerInput.js +++ b/js/TiddlerInput.js @@ -161,8 +161,10 @@ var inputTiddlyWiki = function(text,fields) { while(match && startPos < storeAreaPos[1]) { var endPos = endOfDivRegExp.lastIndex, tiddlerFields = parseTiddlerDiv(text.substring(startPos,endPos),fields); - tiddlerFields.text = utils.htmlDecode(tiddlerFields.text); - results.push(tiddlerFields); + if(tiddlerFields.text !== null) { + tiddlerFields.text = utils.htmlDecode(tiddlerFields.text); + results.push(tiddlerFields); + } startPos = endPos; match = endOfDivRegExp.exec(text); }