mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 07:32:59 +00:00 
			
		
		
		
	Give tiddlers a hasField() method
This commit is contained in:
		| @@ -16,6 +16,10 @@ exports.hasTag = function(tag) { | |||||||
| 	return this.fields.tags && this.fields.tags.indexOf(tag) !== -1; | 	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) { | exports.getFieldString = function(field) { | ||||||
| 	var value = this.fields[field]; | 	var value = this.fields[field]; | ||||||
| 	// Check for a missing field | 	// Check for a missing field | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston