fix: bail if !window.Countly

This commit is contained in:
Chris Waring committed 2021-04-08 12:58:42 +01:00
1 parent 37a4c9544e
commit 2ba7519f6a
1 file changed
+2
+2
View File
@@ -44,6 +44,8 @@ export function loadScript() {
Track an event to countly with the provided data
*/
export function trackEvent(event, data = {}) {
if (!window.Countly) return
window.Countly.q.push([
'add_event',
{