From a54a7806d52db6c00b1580be0f2ba440460cf4c5 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 30 Apr 2013 22:37:02 +0100 Subject: [PATCH] Remove redefinition of Tiddler.hasField() and added Tiddler.isPlugin() hasField() was already being defined in boot.js --- core/modules/tiddler.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/tiddler.js b/core/modules/tiddler.js index 5180b59f9..668022b21 100644 --- a/core/modules/tiddler.js +++ b/core/modules/tiddler.js @@ -3,7 +3,7 @@ title: $:/core/modules/tiddler.js type: application/javascript 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(){ @@ -16,8 +16,8 @@ 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.isPlugin = function() { + return this.fields.type === "application/json" && this.hasField("plugin") && this.hasField("plugin-type"); } exports.getFieldString = function(field) {