Skip to content

Commit

Permalink
Handle global dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
karniv00l committed Mar 2, 2023
1 parent 9ac8864 commit cc4e710
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/ini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,12 +681,10 @@ export class INI implements ParserInterface {
P.all,
).parse(line);

if (!this.currentDialog) {
throw new Error('Dialog not set');
}

if (helpResult.status) {
this.result.dialogs[this.currentDialog!].help = INI.sanitize(helpResult.value.help);
if (this.currentDialog) {
if (helpResult.status) {
this.result.dialogs[this.currentDialog!].help = INI.sanitize(helpResult.value.help);
}
}

// TODO: missing fields:
Expand Down

0 comments on commit cc4e710

Please sign in to comment.