Skip to content
Snippets Groups Projects
Commit 7f199403 authored by jojohoch's avatar jojohoch
Browse files

[player] Fix ExpressionChangedAfterItHasBeenCheckedError

- Error was raised when loading a second unit. It was caused by the
binding of the UnitStateService to the UnitMenuComponent
parent 861feff8
No related branches found
No related tags found
No related merge requests found
import { Component, OnInit } from '@angular/core';
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { PlayerConfig, VopStartCommand } from 'player/modules/verona/models/verona';
import { Unit } from 'common/models/unit';
import { LogService } from 'player/modules/logging/services/log.service';
......@@ -26,7 +26,8 @@ export class UnitComponent implements OnInit {
private veronaPostService: VeronaPostService,
private veronaSubscriptionService: VeronaSubscriptionService,
private elementModelElementCodeMappingService: ElementModelElementCodeMappingService,
private sanitizationService: SanitizationService) {
private sanitizationService: SanitizationService,
private changeDetectorRef: ChangeDetectorRef) {
}
ngOnInit(): void {
......@@ -79,5 +80,6 @@ export class UnitComponent implements OnInit {
private reset(): void {
this.pages = [];
this.playerConfig = null;
this.changeDetectorRef.detectChanges();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment