fix(core.gbapp): Language instance acquisition fixed.
This commit is contained in:
parent
2b74c3c7e1
commit
387b3407f3
2 changed files with 8 additions and 2 deletions
|
@ -532,8 +532,12 @@ export class GBConversationalService {
|
|||
}
|
||||
|
||||
public async getLanguage(min: GBMinInstance, text: string): Promise<string> {
|
||||
const key = min.core.getParam<string>(min.instance, 'textAnalyticsKey', null);
|
||||
if (!key) {
|
||||
return process.env.DEFAULT_USER_LANGUAGE;
|
||||
}
|
||||
return await AzureText.getLocale(
|
||||
min.core.getParam<string>(min.instance, 'textAnalyticsKey', null),
|
||||
key,
|
||||
min.core.getParam<string>(min.instance, 'textAnalyticsEndpoint', null),
|
||||
text
|
||||
);
|
||||
|
|
|
@ -594,7 +594,9 @@ STORAGE_SYNC=true
|
|||
value = instance['dataValues'][name];
|
||||
if (value === null) {
|
||||
const minBoot = GBServer.globals.minBoot as any;
|
||||
value = minBoot.instance.datavalues[name];
|
||||
if (minBoot.instance && minBoot.instance.datavalues){
|
||||
value = minBoot.instance.datavalues[name];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue