summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorniko <niko>2012-08-21 08:00:13 (GMT)
committerniko <niko>2012-08-21 08:00:13 (GMT)
commitfa1c405f2c9a21a1b0b23c86a96e25e26e2c3f25 (patch)
tree57e2070a1469c29f9733bf09551c43e66004eda9 /src
parentc63a72f5290d346036b8896e2cbc9974455cd880 (diff)
downloadsynckolab-fa1c405f2c9a21a1b0b23c86a96e25e26e2c3f25.tar.gz
add a check for fileContent
Diffstat (limited to 'src')
-rw-r--r--src/chrome/content/synckolab/calendarTools.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/chrome/content/synckolab/calendarTools.js b/src/chrome/content/synckolab/calendarTools.js
index bcedf20..e9a087d 100644
--- a/src/chrome/content/synckolab/calendarTools.js
+++ b/src/chrome/content/synckolab/calendarTools.js
@@ -371,6 +371,12 @@ com.synckolab.calendarTools.message2json = function (fileContent, syncTasks) {
return fileContent;
}
+ // fileContent should be a string - with indexOf
+ if(!fileContent.indexOf) {
+ com.synckolab.tools.logMessage("Unknown fileContent: " + fileContent.toSource(), com.synckolab.global.LOG_CAL + com.synckolab.global.LOG_WARNING);
+ return null;
+ }
+
if (fileContent.indexOf("<?xml") !== -1 || fileContent.indexOf("<?XML") !== -1)
{
return this.xml2json(fileContent, syncTasks);