From f56f5dcc5655563cda7928aea7f65359857024fd Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 29 Nov 2023 11:23:57 +0000 Subject: [PATCH] Fix savetiddlers handling of tiddlers with no text field --- core/modules/commands/savetiddlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/commands/savetiddlers.js b/core/modules/commands/savetiddlers.js index d3b82d726..9c750e204 100644 --- a/core/modules/commands/savetiddlers.js +++ b/core/modules/commands/savetiddlers.js @@ -46,7 +46,7 @@ Command.prototype.execute = function() { type = tiddler.fields.type || "text/vnd.tiddlywiki", contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"}, filename = path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title)); - fs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding); + fs.writeFileSync(filename,tiddler.fields.text || "",contentTypeInfo.encoding); }); return null; };