1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-29 15:30:47 +00:00

Give tiddlers a hasField() method

This commit is contained in:
Jeremy Ruston 2013-04-29 12:05:58 +01:00
parent 17cfd57390
commit c3e14a85a6

View File

@ -16,6 +16,10 @@ exports.hasTag = function(tag) {
return this.fields.tags && this.fields.tags.indexOf(tag) !== -1;
};
exports.hasField = function(field) {
return $tw.utils.hop(this.fields,field);
}
exports.getFieldString = function(field) {
var value = this.fields[field];
// Check for a missing field