fix(core): session exporting while on default dc
This commit is contained in:
parent
465da7aa9d
commit
e42a73fd07
1 changed files with 1 additions and 2 deletions
|
@ -579,8 +579,7 @@ export class BaseTelegramClient extends EventEmitter {
|
|||
* > with [@BotFather](//t.me/botfather)
|
||||
*/
|
||||
async exportSession(): Promise<string> {
|
||||
const primaryDcs = await this.storage.getDefaultDcs()
|
||||
if (!primaryDcs) throw new Error('No default DC set')
|
||||
const primaryDcs = (await this.storage.getDefaultDcs()) ?? this._defaultDcs
|
||||
|
||||
const authKey = await this.storage.getAuthKeyFor(primaryDcs.main.id)
|
||||
if (!authKey) throw new Error('Auth key is not ready yet')
|
||||
|
|
Loading…
Reference in a new issue