1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Fix bug with innerwiki template

The problem was that the innerwiki template included the tiddler $:/plugins/tiddlywiki/railroad, which was omitted from the wiki. Unexpectedly, missing tiddlers were rendered by the jsontiddler widget as an empty object {}. The fix is to always include the title when the tiddler is missing.

Also cleaned up the template to remove unneeded tiddlers
This commit is contained in:
jeremy@jermolene.com 2021-10-02 16:17:07 +01:00
parent 5192a39830
commit d5d73e02e9
3 changed files with 4 additions and 5 deletions

View File

@ -79,6 +79,8 @@ JSONTiddlerWidget.prototype.getTiddlerFields = function() {
var tiddler = this.wiki.getTiddler(this.attTiddler);
if(tiddler) {
fields = tiddler.getFieldStrings({exclude: this.attExclude.split(" ")});
} else {
fields = {title: this.attTiddler};
}
}
return fields;

View File

@ -1,7 +1,8 @@
{
"description": "Innerwiki Plugin Demo",
"plugins": [
"tiddlywiki/innerwiki"
"tiddlywiki/innerwiki",
"tiddlywiki/railroad"
],
"themes": [
"tiddlywiki/vanilla",

View File

@ -1,11 +1,7 @@
title: $:/plugins/tiddlywiki/innerwiki/template
\define saveTiddlerFilter()
$:/boot/boot.css
$:/boot/boot.js
$:/boot/bootprefix.js
$:/core
$:/library/sjcl.js
$:/plugins/tiddlywiki/innerwiki
$:/plugins/tiddlywiki/railroad
$:/themes/tiddlywiki/snowwhite