MOBILE-3565 core: Fix errors when compiling in prod mode

main
Dani Palou 2020-10-26 10:03:32 +01:00
parent 1d794f42b4
commit 06c7035834
5 changed files with 10 additions and 10 deletions

View File

@ -50,20 +50,20 @@ export class CoreLoadingComponent implements OnInit, OnChanges, AfterViewInit {
@Input() message?: string; // Message to show while loading.
@ViewChild('content') content?: ElementRef;
protected uniqueId!: string;
uniqueId: string;
protected element: HTMLElement; // Current element.
constructor(element: ElementRef) {
this.element = element.nativeElement;
// Calculate the unique ID.
this.uniqueId = 'core-loading-content-' + CoreUtils.instance.getUniqueId('CoreLoadingComponent');
}
/**
* Component being initialized.
*/
ngOnInit(): void {
// Calculate the unique ID.
this.uniqueId = 'core-loading-content-' + CoreUtils.instance.getUniqueId('CoreLoadingComponent');
if (!this.message) {
// Default loading message.
this.message = Translate.instance.instant('core.loading');

View File

@ -45,8 +45,8 @@ export class CoreShowPasswordComponent implements OnInit, AfterViewInit {
@ContentChild(IonInput) ionInput?: IonInput;
shown!: boolean; // Whether the password is shown.
label?: string; // Label for the button to show/hide.
iconName?: string; // Name of the icon of the button to show/hide.
label!: string; // Label for the button to show/hide.
iconName!: string; // Name of the icon of the button to show/hide.
selector = ''; // Selector to identify the input.
protected input?: HTMLInputElement | null; // Input affected.

View File

@ -417,8 +417,8 @@ export class CoreLoginSitePage implements OnInit {
* @param event Received Event.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
filterChanged(event: any): void {
const newValue = event.target.value?.trim().toLowerCase();
filterChanged(event?: any): void {
const newValue = event?.target.value?.trim().toLowerCase();
if (!newValue || !this.fixedSites) {
this.filteredSites = this.fixedSites;
} else {

View File

@ -49,7 +49,7 @@
<h2>{{ 'core.scanqr' | translate }}</h2>
</ion-label>
</ion-item>
<ion-item *ngIf="showWeb" [href]="siteInfo.siteurl" core-link autoLogin="yes" title="{{ 'core.mainmenu.website' | translate }}">
<ion-item *ngIf="showWeb && siteInfo" [href]="siteInfo.siteurl" core-link autoLogin="yes" title="{{ 'core.mainmenu.website' | translate }}">
<ion-icon name="globe" slot="start" aria-hidden="true"></ion-icon>
<ion-label>
<h2>{{ 'core.mainmenu.website' | translate }}</h2>

View File

@ -38,7 +38,7 @@ export class CoreMainMenuMorePage implements OnInit, OnDestroy {
handlersLoaded = false;
siteInfo?: CoreSiteInfo;
siteName?: string;
logoutLabel?: string;
logoutLabel = 'core.mainmenu.changesite';
showScanQR: boolean;
showWeb?: boolean;
showHelp?: boolean;