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:
parent
127d547632
commit
bc8b72e6eb
@ -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];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user