?admin use JavaScript Optional chaining

This commit is contained in:
the-djmaze 2022-09-01 21:28:37 +02:00
parent 17fa031064
commit 1a130d0be3
4 changed files with 9 additions and 9 deletions

View file

@ -57,7 +57,7 @@ export class AdminSettingsAbout /*extends AbstractViewSettings*/ {
this.coreChecking(true);
Remote.request('AdminUpdateInfo', (iError, data) => {
this.coreChecking(false);
if (!iError && data && data.Result) {
if (!iError && data?.Result) {
this.coreReal(true);
this.coreUpdatable(!!data.Result.Updatable);
this.coreWarning(!!data.Result.Warning);
@ -79,7 +79,7 @@ export class AdminSettingsAbout /*extends AbstractViewSettings*/ {
this.coreUpdating(false);
this.coreVersion('');
this.coreVersionCompare(-2);
if (!iError && data && data.Result) {
if (!iError && data?.Result) {
this.coreReal(true);
window.location.reload();
} else {