Skip to content

Commit

Permalink
fix: local page auto fall into online site.
Browse files Browse the repository at this point in the history
  • Loading branch information
o0vO committed Jan 25, 2024
1 parent 5492617 commit 70f2f0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/packages/client-sdk/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
AppMessageType,
AppSendMessageType,
MasterReplyMessageType,
Session,
SessionV1
} from './types';
import { isBrowser } from './utils';
Expand Down Expand Up @@ -45,7 +44,7 @@ class ClientSDK {

this.callback.set(messageId, (data: MasterReplyMessageType) => {
clearTimeout(timer);
if (data.success === true) {
if (data.success) {
resolve(data.data);
} else {
reject(data);
Expand Down Expand Up @@ -102,7 +101,7 @@ class ClientSDK {
if (this.userSession) {
return Promise.resolve(this.userSession);
}
return this.sendMessageToMaster(API_NAME.USER_GET_INFO);
return this.sendMessageToMaster(API_NAME.USER_GET_INFO, { success: true });
}

getLanguage(): Promise<{ lng: string }> {
Expand Down

0 comments on commit 70f2f0e

Please sign in to comment.