kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Remove empty tag fields in the field mangler
This means that removing the last tag from a tiddler will remove the tags field.print-window-tiddler
rodzic
d3c421985c
commit
1e54b1bcc9
|
@ -91,6 +91,9 @@ FieldManglerWidget.prototype.handleRemoveTagEvent = function(event) {
|
|||
var modification = this.wiki.getModificationFields();
|
||||
modification.tags = (tiddler.fields.tags || []).slice(0);
|
||||
modification.tags.splice(p,1);
|
||||
if(modification.tags.length === 0) {
|
||||
modification.tags = undefined;
|
||||
}
|
||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue