Fixed error when leaving the settings too early
This commit is contained in:
parent
9785f67562
commit
8904472d23
@ -46,7 +46,7 @@ export class OpenSlidesTranslateService extends TranslateService {
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
public get(key: string | Array<string>, interpolateParams?: Object): Observable<string | any> {
|
||||
public get(key: string | string[], interpolateParams?: Object): Observable<string | any> {
|
||||
try {
|
||||
return super.get(key, interpolateParams);
|
||||
} catch {
|
||||
@ -59,7 +59,7 @@ export class OpenSlidesTranslateService extends TranslateService {
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
public stream(key: string | Array<string>, interpolateParams?: Object): Observable<string | any> {
|
||||
public stream(key: string | string[], interpolateParams?: Object): Observable<string | any> {
|
||||
try {
|
||||
return super.stream(key, interpolateParams);
|
||||
} catch {
|
||||
@ -72,7 +72,7 @@ export class OpenSlidesTranslateService extends TranslateService {
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
public instant(key: string | Array<string>, interpolateParams?: Object): string | any {
|
||||
public instant(key: string | string[], interpolateParams?: Object): string | any {
|
||||
try {
|
||||
return super.instant(key, interpolateParams);
|
||||
} catch {
|
||||
|
@ -284,7 +284,7 @@ export class HtmlToPdfService {
|
||||
* @param styles the styles array, usually just to parse back into the `parseElement` function
|
||||
* @returns an array of parsed children
|
||||
*/
|
||||
private parseChildren(element: any, styles?: Array<string>): any {
|
||||
private parseChildren(element: any, styles?: string[]): any {
|
||||
const childNodes = element.childNodes;
|
||||
const paragraph = [];
|
||||
if (childNodes.length > 0) {
|
||||
|
@ -288,7 +288,7 @@ export class PdfDocumentService {
|
||||
const columns = [];
|
||||
let logoContainerWidth: string;
|
||||
let pageNumberPosition: string;
|
||||
let logoContainerSize: Array<number>;
|
||||
let logoContainerSize: number[];
|
||||
let logoFooterLeftUrl = this.configService.instant<any>('logo_pdf_footer_L').path;
|
||||
let logoFooterRightUrl = this.configService.instant<any>('logo_pdf_footer_R').path;
|
||||
|
||||
|
@ -34,7 +34,7 @@ describe('SearchValueSelectorComponent', () => {
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
const subjectList: Array<Selectable> = [];
|
||||
const subjectList: Selectable[] = [];
|
||||
for (let index = 0; index < 20; index++) {
|
||||
subjectList.push(new EmptySelectable());
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ describe('SortingListComponent', () => {
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
const inputList: Array<Selectable> = [];
|
||||
const inputList: Selectable[] = [];
|
||||
for (let index = 0; index < 20; index++) {
|
||||
inputList.push(new EmptySelectable());
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ export class SortingListComponent implements OnInit, OnDestroy {
|
||||
/**
|
||||
* Sorted and returned
|
||||
*/
|
||||
public array: Array<Selectable>;
|
||||
public array: Selectable[];
|
||||
|
||||
/**
|
||||
* Declare the templateRef to coexist between parent in child
|
||||
|
@ -187,10 +187,23 @@ export class ConfigFieldComponent extends BaseComponent implements OnInit {
|
||||
}
|
||||
this.updateSuccessIconTimeout = <any>setTimeout(() => {
|
||||
this.updateSuccessIcon = false;
|
||||
this.cdRef.detectChanges();
|
||||
if (!this.wasViewDestroyed()) {
|
||||
this.cdRef.detectChanges();
|
||||
}
|
||||
}, 2000);
|
||||
this.updateSuccessIcon = true;
|
||||
this.cdRef.detectChanges();
|
||||
if (!this.wasViewDestroyed()) {
|
||||
this.cdRef.detectChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns true, if the veiw was destroyed. Note: This
|
||||
* needs to access internal attributes from the change detection
|
||||
* reference.
|
||||
*/
|
||||
private wasViewDestroyed(): boolean {
|
||||
return (<any>this.cdRef).destroyed;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,7 +164,7 @@ export class MotionPollPdfService {
|
||||
* @param subtitle: second line for the ballot.
|
||||
* @returns an array of content objects defining pdfMake instructions
|
||||
*/
|
||||
private getContent(title: string, subtitle: string): Array<object> {
|
||||
private getContent(title: string, subtitle: string): object[] {
|
||||
const content = [];
|
||||
const amount = this.getBallotCount();
|
||||
const fullpages = Math.floor(amount / 8);
|
||||
@ -275,7 +275,7 @@ export class MotionPollPdfService {
|
||||
* @param size the size of the circle
|
||||
* @returns an array containing one circle definition for pdfMake
|
||||
*/
|
||||
private drawCircle(y: number, size: number): Array<object> {
|
||||
private drawCircle(y: number, size: number): object[] {
|
||||
return [
|
||||
{
|
||||
type: 'ellipse',
|
||||
|
Loading…
Reference in New Issue
Block a user