mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
parent
da298f037d
commit
892a1f560e
@ -72,8 +72,16 @@ exports["application/x-tiddler-html-div"] = function(text,fields) {
|
||||
};
|
||||
|
||||
exports["application/json"] = function(text,fields) {
|
||||
var incoming = JSON.parse(text),
|
||||
var incoming,
|
||||
results = [];
|
||||
try {
|
||||
incoming = JSON.parse(text);
|
||||
} catch(e) {
|
||||
incoming = [{
|
||||
title: "JSON error: " + e,
|
||||
text: ""
|
||||
}]
|
||||
}
|
||||
if($tw.utils.isArray(incoming)) {
|
||||
for(var t=0; t<incoming.length; t++) {
|
||||
var incomingFields = incoming[t],
|
||||
|
Loading…
Reference in New Issue
Block a user