From 3b08b5e9ddaabf07c77ab92bf7dbd9c16c76b837 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 9 Nov 2014 21:47:00 +0000 Subject: [PATCH] More resilience to Tiddler.isEqual() --- core/modules/tiddler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/modules/tiddler.js b/core/modules/tiddler.js index 430e831fe..f77b41108 100644 --- a/core/modules/tiddler.js +++ b/core/modules/tiddler.js @@ -63,6 +63,9 @@ tiddler: the tiddler to compare excludeFields: array of field names to exclude from the comparison */ exports.isEqual = function(tiddler,excludeFields) { + if(!(tiddler instanceof $tw.Tiddler)) { + return false; + } excludeFields = excludeFields || []; var self = this, differences = []; // Fields that have differences