From 48fa12b77017fb7af47ca58cef5da4b7bcbff0e9 Mon Sep 17 00:00:00 2001 From: Mathieu Nayrolles Date: Thu, 24 Nov 2016 11:10:18 -0500 Subject: [PATCH] fix(chat): On Android, the app won't crash anymore when starting the chat @see https://issues.apache.org/jira/browse/CB-12184 --- src/components/header/header.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/header/header.ts b/src/components/header/header.ts index 081c5b9..3e0cf3b 100644 --- a/src/components/header/header.ts +++ b/src/components/header/header.ts @@ -31,8 +31,11 @@ export class Header { } onChat(){ - let browser = new InAppBrowser('https://go.crisp.im/chat/embed/?website_id=-K4rBEcM_Qbt6JrISVzu', '_system'); + let browser = new InAppBrowser('https://go.crisp.im/chat/embed/?website_id=-K4rBEcM_Qbt6JrISVzu', '_blank'); + /** + * Don't do inject if user isn't logged yet + */ if(GAService.userEmail != null && GAService.userName != null){ @@ -40,7 +43,6 @@ export class Header { + '$crisp.set("user:email", "'+ GAService.userEmail +'");' + '$crisp.set("user:nickname", "'+ GAService.userName +'");' +'' - console.log(script); browser.executeScript({code: script}); } }