kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fixed bug when using checkbox widget to apply a tag to a tiddler that is untagged
rodzic
9e48460940
commit
c77b451863
|
@ -62,7 +62,7 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
||||||
var checked = this.inputDomNode.checked,
|
var checked = this.inputDomNode.checked,
|
||||||
tiddler = this.wiki.getTiddler(this.checkboxTitle);
|
tiddler = this.wiki.getTiddler(this.checkboxTitle);
|
||||||
if(tiddler && tiddler.hasTag(this.checkboxTag) !== checked) {
|
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);
|
pos = newTags.indexOf(this.checkboxTag);
|
||||||
if(pos !== -1) {
|
if(pos !== -1) {
|
||||||
newTags.splice(pos,1);
|
newTags.splice(pos,1);
|
||||||
|
|
Ładowanie…
Reference in New Issue