Fixed error message that viewmodel is not projectable.

This commit is contained in:
Emanuel Schütze 2019-02-25 11:55:43 +01:00
parent eb2c866e5c
commit ff82fceaa9

View File

@ -269,7 +269,7 @@ export class ProjectorService {
): T { ): T {
this.assertElementIsMappable(element); this.assertElementIsMappable(element);
const viewModel = this.viewModelStore.get<T>(element.name, element.id); const viewModel = this.viewModelStore.get<T>(element.name, element.id);
if (!isProjectable(viewModel)) { if (viewModel && !isProjectable(viewModel)) {
console.error('The view model is not projectable', viewModel, element); console.error('The view model is not projectable', viewModel, element);
} }
return viewModel; return viewModel;