HOT-FIX. Исправлена ошибка получения конфигов

This commit is contained in:
2020-08-02 01:14:25 +03:00
parent 3009e415cf
commit e7c9d345d6

View File

@ -21,7 +21,7 @@ class AdminConfigsService {
* Метод получения информации о текущем api * Метод получения информации о текущем api
*/ */
getApi () { getApi () {
const {apiName} = this.getOptions(); const {apiName} = this.getOptions() ?? {};
if (apiName) { if (apiName) {
return API_OPTIONS[apiName]; return API_OPTIONS[apiName];
} }
@ -39,7 +39,7 @@ class AdminConfigsService {
* __adminConfig.setApi('api-l') * __adminConfig.setApi('api-l')
*/ */
setApi (apiName) { setApi (apiName) {
const options = this.getOptions(); const options = this.getOptions() ?? {};
if (Object.values(API_NAMES).includes(apiName)) { if (Object.values(API_NAMES).includes(apiName)) {
this.api.createOrUpdate({ this.api.createOrUpdate({
...options, ...options,