1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

GoogleAnalytics Plugin: Make sure we don't crash if the config tiddlers don't exist

This commit is contained in:
Jermolene 2017-02-13 11:39:39 +00:00
parent 95f565878e
commit 467bf17dd8

View File

@ -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