Skip to content

Commit

Permalink
fix(general): tslint being applied in all sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Apr 8, 2019
1 parent 69ca62b commit 6de285e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/core.gbapp/services/GBMinService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ export class GBMinService {
if (context.activity.name === 'whoAmI') {
await step.beginDialog('/whoAmI');
} else if (context.activity.name === 'showSubjects') {
await step.beginDialog('/menu');
await step.beginDialog('/menu', undefined);
} else if (context.activity.name === 'giveFeedback') {
await step.beginDialog('/feedback', {
fromMenu: true
Expand Down
10 changes: 6 additions & 4 deletions packages/kb.gbapp/dialogs/MenuDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,20 @@ export class MenuDialog extends IGBDialog {
const user = await min.userProfile.get(step.context, {});
const args: MenuDialogArgs = step.options;

let rootSubjectId;
// tslint:disable-next-line: no-null-keyword
let rootSubjectId = null;

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

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

user.subjects.push(args);
rootSubjectId = args.subjectId;
// tslint:disable-next-line: no-null-keyword
rootSubjectId = args.subjectId === undefined ? null : args.subjectId;

// Whenever a subject is selected, shows a faq about it.
if (user.subjects.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion packages/kb.gbapp/services/KBService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class KBService {
}

public static getFormattedSubjectItems(subjects: GuaribasSubject[]) {
if (subjects !== null) {
if (subjects === null) {
return '';
}
const out = [];
Expand Down
5 changes: 2 additions & 3 deletions packages/kb.gbapp/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ export const Messages = {
here_is_subjects: 'Here are some subjects to choose from...',
menu_select: 'Select',
lets_search: query =>
`Vamos pesquisar sobre ${query}... O que deseja saber?`,
see_faq:
'Please take a look at the FAQ I\'ve prepared for you. You can click on them to get the answer.',
`Lets search for ${query}... What do you want to know?`,
see_faq: 'Please take a look at the FAQ I\'ve prepared for you. You can click on them to get the answer.',
will_answer_projector:
'I\'ll answer on the projector to a better experience...',
ask_first_time: 'What are you looking for?'
Expand Down

0 comments on commit 6de285e

Please sign in to comment.