ABP: Internet Explorer выдает ошибку при входе в систему - PullRequest
0 голосов
/ 08 мая 2018

Я только что заметил странную проблему в IE. Все отлично работает в Google Chrome. Но в IE он выдает исключение на "http://localhost:4200/"! Вот вывод консоли IE:

ОШИБКА Ошибка: Uncaught (в обещании): TypeError: Невозможно получить свойство 'версия' с неопределенной или нулевой ссылкой TypeError: Невозможно получить свойство 'версия' с неопределенной или нулевой ссылкой на AccountComponent (код ошибки: 31: 9) в createClass (код eval: 12653: 13) в createDirectiveInstance (код eval: 12496: 5) в createViewNodes (код eval: 13954: 21) в createRootView (код eval: 13843: 5) в callWithDebugContext (код eval: 15268: 9) в debugCreateRootView (код eval: 14551: 5) в ComponentFactory_.prototype.create (код eval: 11448: 9) в ComponentFactoryBoundToModule.prototype.create (код eval: 4235: 9) в ViewContainerRef_.prototype.createComponent (116: 9)

По какой-то причине приложение не определено в account.component:

this.versionText = this.appSession.application.version + ' [' + this.appSession.application.releaseDate.format('YYYYDDMM') + ']';

Я проследил это и вижу, где проблема, но не совсем уверен, как ее исправить Проблема возникает в файле app-session.service.ts в методе init:

init(): Promise<boolean> { return new Promise<boolean>((resolve, reject) => { this._sessionService.getCurrentLoginInformations().toPromise().then((result: GetCurrentLoginInformationsOutput) => { this._application = result.application; this._user = result.user; this._tenant = result.tenant; resolve(true); }, (err) => { reject(err); }); }); }

По какой-то причине все result.application, result.user и result.tenant не определены.

Интересно, что в Chrome все хорошо работает!

...