From 467bf17dd838ef36a2cf09b7640ead07f59599df Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 13 Feb 2017 11:39:39 +0000 Subject: [PATCH] GoogleAnalytics Plugin: Make sure we don't crash if the config tiddlers don't exist --- plugins/tiddlywiki/googleanalytics/googleanalytics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tiddlywiki/googleanalytics/googleanalytics.js b/plugins/tiddlywiki/googleanalytics/googleanalytics.js index e592c124c..a3f48a321 100644 --- a/plugins/tiddlywiki/googleanalytics/googleanalytics.js +++ b/plugins/tiddlywiki/googleanalytics/googleanalytics.js @@ -19,8 +19,8 @@ exports.synchronous = true; exports.startup = function() { // getting parameters - var GA_ACCOUNT = $tw.wiki.getTiddlerText("$:/GoogleAnalyticsAccount").replace(/\n/g,""), - GA_DOMAIN = $tw.wiki.getTiddlerText("$:/GoogleAnalyticsDomain").replace(/\n/g,""); + var GA_ACCOUNT = $tw.wiki.getTiddlerText("$:/GoogleAnalyticsAccount","").replace(/\n/g,""), + GA_DOMAIN = $tw.wiki.getTiddlerText("$:/GoogleAnalyticsDomain","").replace(/\n/g,""); if (GA_DOMAIN == "" || GA_DOMAIN == undefined) GA_DOMAIN = "auto"; // using ga "isogram" function