Fixed bug when using checkbox widget to apply a tag to a tiddler that is untagged

print-window-tiddler
Jermolene 2013-11-10 19:21:37 +00:00
rodzic 9e48460940
commit c77b451863
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -62,7 +62,7 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
var checked = this.inputDomNode.checked,
tiddler = this.wiki.getTiddler(this.checkboxTitle);
if(tiddler && tiddler.hasTag(this.checkboxTag) !== checked) {
var newTags = tiddler.fields.tags.slice(0),
var newTags = (tiddler.fields.tags || []).slice(0),
pos = newTags.indexOf(this.checkboxTag);
if(pos !== -1) {
newTags.splice(pos,1);