mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +00:00
Remove redefinition of Tiddler.hasField() and added Tiddler.isPlugin()
hasField() was already being defined in boot.js
This commit is contained in:
parent
e12fbf0f9f
commit
a54a7806d5
@ -3,7 +3,7 @@ title: $:/core/modules/tiddler.js
|
|||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: tiddlermethod
|
module-type: tiddlermethod
|
||||||
|
|
||||||
Extension methods for the $tw.Tiddler object
|
Extension methods for the $tw.Tiddler object (constructor and methods required at boot time are in boot/boot.js)
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
(function(){
|
(function(){
|
||||||
@ -16,8 +16,8 @@ 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) {
|
exports.isPlugin = function() {
|
||||||
return $tw.utils.hop(this.fields,field);
|
return this.fields.type === "application/json" && this.hasField("plugin") && this.hasField("plugin-type");
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getFieldString = function(field) {
|
exports.getFieldString = function(field) {
|
||||||
|
Loading…
Reference in New Issue
Block a user