From db2fafb0ab9a7a6166bf28edbfaa90db730cae86 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 3 Dec 2011 11:38:57 +0000 Subject: [PATCH] Fixed problem with non-standard tiddler types (e.g. .jar) --- js/TiddlerInput.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/TiddlerInput.js b/js/TiddlerInput.js index 817d983a7..92bdb90d9 100755 --- a/js/TiddlerInput.js +++ b/js/TiddlerInput.js @@ -26,11 +26,9 @@ tiddlerInput.parseTiddlerFile = function(text,type,fields) { type = fileExtensionMapping; // Invoke the parser for the specified mimetype var parser = tiddlerInput.parseTiddlerFileByMimeType[type]; - if(parser) { - return parser(text,fields); - } else { - throw new Error("Unknown tiddler type in tiddlerInput.parseTiddlerFile: " + type); - } + if(!parser) + parser = tiddlerInput.parseTiddlerFileByMimeType["text/plain"]; + return parser(text,fields); }; tiddlerInput.fileExtensionMappings = {