mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-04 17:16:18 +00:00
Give tiddlers a hasField() method
This commit is contained in:
parent
17cfd57390
commit
c3e14a85a6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user