Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed May 20, 2020
2 parents 78f4861 + 671d66e commit 64889b5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/liff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ import { t } from 'ttag';
import { isDuringLiffRedirect } from './lib';
import App from './App.svelte';

// Commenting this secion out during LIFF development to enable debugging on desktop
// (Can do everything except liff.sendMessage)
//
if (!liff.isInClient()) {
alert(
t`Sorry, the function is not applicable on desktop.` +
'\n' +
t`Please proceed on your mobile phone.` +
' 📲 '
);
liff.closeWindow();
}

liff.init({ liffId: LIFF_ID }).then(() => {
// liff.init should have corrected the path now, don't initialize app and just wait...
// Ref: https://www.facebook.com/groups/linebot/permalink/2380490388948200/?comment_id=2380868955577010
if (isDuringLiffRedirect) return;

// Commenting this secion out during LIFF development to enable debugging on desktop
// (Can do everything except liff.sendMessage)
//
if (!liff.isInClient()) {
alert(
t`Sorry, the function is not applicable on desktop.` +
'\n' +
t`Please proceed on your mobile phone.` +
' 📲 '
);
liff.closeWindow();
}

// Cleanup loading
document.getElementById('loading').remove();
new App({ target: document.body });
Expand Down

0 comments on commit 64889b5

Please sign in to comment.