Skip to content

Commit

Permalink
🐛 fix: Make deep linked questions work on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
jolzee committed Nov 17, 2020
1 parent 270a20d commit 9601b4a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,11 @@ export default {
// Looks for deeplink ?question=Hello there
const urlParams = new URLSearchParams(window.location.search);
const initialUserInput = urlParams.get("question");
if (initialUserInput && !this.isChatOpen) {
this.toggleChat();
if (initialUserInput) {
if (!this.isChatOpen && !this.isMobileDevice) {
this.toggleChat();
}
setTimeout(() => {
this.$store.commit("SET_USER_INPUT", initialUserInput);
this.$store.commit("USER_INPUT_READY_FOR_SENDING");
Expand Down

0 comments on commit 9601b4a

Please sign in to comment.