Skip to content

Commit

Permalink
Fix: some plugin subtiddlers do not have title in savewikifolder comm…
Browse files Browse the repository at this point in the history
…and (#8151)

* fix: some plugin subtiddlers do not have title in savewikifolder command

* fix: following coding style
  • Loading branch information
FSpark authored Apr 25, 2024
1 parent a081e58 commit 67845f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/modules/commands/savewikifolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ WikiFolderMaker.prototype.saveCustomPlugin = function(pluginTiddler) {
this.saveJSONFile(directory + path.sep + "plugin.info",pluginInfo);
self.log("Writing " + directory + path.sep + "plugin.info: " + JSON.stringify(pluginInfo,null,$tw.config.preferences.jsonSpaces));
var pluginTiddlers = $tw.utils.parseJSONSafe(pluginTiddler.fields.text).tiddlers; // A hashmap of tiddlers in the plugin
$tw.utils.each(pluginTiddlers,function(tiddler) {
$tw.utils.each(pluginTiddlers,function(tiddler,title) {
if(!tiddler.title) {
tiddler.title = title;
}
self.saveTiddler(directory,new $tw.Tiddler(tiddler));
});
};
Expand Down

0 comments on commit 67845f8

Please sign in to comment.