Skip to content

Commit

Permalink
fix(chat): On Android, the app won't crash anymore when starting the …
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Nov 24, 2016
1 parent 75d16a4 commit 48fa12b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/header/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ 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){


let script:string = ''
+ '$crisp.set("user:email", "'+ GAService.userEmail +'");'
+ '$crisp.set("user:nickname", "'+ GAService.userName +'");'
+''
console.log(script);
browser.executeScript({code: script});
}
}
Expand Down

0 comments on commit 48fa12b

Please sign in to comment.