If the data is part of a type not yet known to Angular, the object is null

The null object causes an exception further down the road
This commit is contained in:
Ben Bosman
2020-03-17 12:00:17 +01:00
parent e76c6e4dc3
commit c6de988486

View File

@@ -51,7 +51,7 @@ export abstract class BaseResponseParsingService {
return this.processArray(data, request);
} else if (isRestDataObject(data)) {
const object = this.deserialize(data);
if (isNotEmpty(data._embedded)) {
if (isNotEmpty(data._embedded) && hasValue(object)) {
Object
.keys(data._embedded)
.filter((property) => data._embedded.hasOwnProperty(property))