1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-25 19:17:19 +00:00

Fix savetiddlers handling of tiddlers with no text field

This commit is contained in:
Jeremy Ruston 2023-11-29 11:23:57 +00:00
parent fc1e9b6c43
commit f56f5dcc56

View File

@ -46,7 +46,7 @@ Command.prototype.execute = function() {
type = tiddler.fields.type || "text/vnd.tiddlywiki", type = tiddler.fields.type || "text/vnd.tiddlywiki",
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"}, contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"},
filename = path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title)); 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; return null;
}; };