1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-06 22:04:19 +00:00

Use hasOwnProperty to text for tiddler existence

This commit is contained in:
Jermolene 2014-03-09 19:20:58 +00:00
parent 127d547632
commit bc8b72e6eb

View File

@ -166,7 +166,7 @@ exports.deleteTiddler = function(title) {
}; };
exports.tiddlerExists = function(title) { exports.tiddlerExists = function(title) {
return !!this.tiddlers[title]; return !!$tw.utils.hop(this.tiddlers,title);
}; };
/* /*
@ -497,7 +497,7 @@ exports.getTagMap = function() {
if(tiddler.fields.tags) { if(tiddler.fields.tags) {
for(var index=0; index<tiddler.fields.tags.length; index++) { for(var index=0; index<tiddler.fields.tags.length; index++) {
var tag = tiddler.fields.tags[index]; var tag = tiddler.fields.tags[index];
if(tags[tag]) { if($tw.utils.hop(tags,tag)) {
tags[tag].push(title) tags[tag].push(title)
} else { } else {
tags[tag] = [title]; tags[tag] = [title];