don't crash if FIREBASE_INIT is not defined
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ import TinodeWeb from './views/tinode-web.jsx';
|
|||||||
import HashNavigation from './lib/navigation.js';
|
import HashNavigation from './lib/navigation.js';
|
||||||
|
|
||||||
// Insert google analytics script and tag if configured.
|
// Insert google analytics script and tag if configured.
|
||||||
if (FIREBASE_INIT && FIREBASE_INIT.measurementId) {
|
if (typeof FIREBASE_INIT != 'undefined' && FIREBASE_INIT && FIREBASE_INIT.measurementId) {
|
||||||
const head = document.getElementsByTagName('head')[0];
|
const head = document.getElementsByTagName('head')[0];
|
||||||
let script = document.createElement('script');
|
let script = document.createElement('script');
|
||||||
script.src = 'https://www.googletagmanager.com/gtag/js?id=' + FIREBASE_INIT.measurementId;
|
script.src = 'https://www.googletagmanager.com/gtag/js?id=' + FIREBASE_INIT.measurementId;
|
||||||
|
|||||||
Reference in New Issue
Block a user