Skip to content

Commit 6de285e

Browse files
fix(general): tslint being applied in all sources.
1 parent 69ca62b commit 6de285e

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

packages/core.gbapp/services/GBMinService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ export class GBMinService {
458458
if (context.activity.name === 'whoAmI') {
459459
await step.beginDialog('/whoAmI');
460460
} else if (context.activity.name === 'showSubjects') {
461-
await step.beginDialog('/menu');
461+
await step.beginDialog('/menu', undefined);
462462
} else if (context.activity.name === 'giveFeedback') {
463463
await step.beginDialog('/feedback', {
464464
fromMenu: true

packages/kb.gbapp/dialogs/MenuDialog.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,20 @@ export class MenuDialog extends IGBDialog {
7676
const user = await min.userProfile.get(step.context, {});
7777
const args: MenuDialogArgs = step.options;
7878

79-
let rootSubjectId;
79+
// tslint:disable-next-line: no-null-keyword
80+
let rootSubjectId = null;
8081

81-
if (args !== undefined) {
82+
if (Object.keys(args).length > 0) {
8283
// If there is a shortcut specified as subject destination, go there.
83-
if (args.to !== undefined) {
84+
if (args.to !== null) {
8485
const dialog = args.to.split(':')[1];
8586

8687
return await step.replaceDialog(`/${dialog}`);
8788
}
8889

8990
user.subjects.push(args);
90-
rootSubjectId = args.subjectId;
91+
// tslint:disable-next-line: no-null-keyword
92+
rootSubjectId = args.subjectId === undefined ? null : args.subjectId;
9193

9294
// Whenever a subject is selected, shows a faq about it.
9395
if (user.subjects.length > 0) {

packages/kb.gbapp/services/KBService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class KBService {
7373
}
7474

7575
public static getFormattedSubjectItems(subjects: GuaribasSubject[]) {
76-
if (subjects !== null) {
76+
if (subjects === null) {
7777
return '';
7878
}
7979
const out = [];

packages/kb.gbapp/strings.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ export const Messages = {
1010
here_is_subjects: 'Here are some subjects to choose from...',
1111
menu_select: 'Select',
1212
lets_search: query =>
13-
`Vamos pesquisar sobre ${query}... O que deseja saber?`,
14-
see_faq:
15-
'Please take a look at the FAQ I\'ve prepared for you. You can click on them to get the answer.',
13+
`Lets search for ${query}... What do you want to know?`,
14+
see_faq: 'Please take a look at the FAQ I\'ve prepared for you. You can click on them to get the answer.',
1615
will_answer_projector:
1716
'I\'ll answer on the projector to a better experience...',
1817
ask_first_time: 'What are you looking for?'

0 commit comments

Comments
 (0)