fix(general): tslint being applied in all sources.

This commit is contained in:
Rodrigo Rodriguez 2019-04-08 11:30:01 -03:00
parent 69ca62bd35
commit 6de285e234
4 changed files with 10 additions and 9 deletions

View file

@ -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

View file

@ -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) {

View file

@ -73,7 +73,7 @@ export class KBService {
}
public static getFormattedSubjectItems(subjects: GuaribasSubject[]) {
if (subjects !== null) {
if (subjects === null) {
return '';
}
const out = [];

View file

@ -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?'