You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am making a request for a PagedResouurce (networks). When the results are empty, I get the error in the title, because the results are returned without an _embedded field
I am making a request for a PagedResouurce (networks). When the results are empty, I get the error in the title, because the results are returned without an _embedded field
Since the results are empty and _embedde3d is OPTIONAl, is this the correct behavior?
function isPagedResourceCollection(object) {
const baseCondition = isObject(object) &&
('_links' in object) &&
('page' in object);
if (!baseCondition) {
return false;
}
if (LibConfig.getConfig().halFormat.collections.embeddedOptional) {
return baseCondition && (Object.keys(object).length === 2 ||
'_embedded' in object && Object.keys(object).length === 3);
}
else {
return baseCondition && '_embedded' in object && Object.keys(object).length === 3;
}
}
The text was updated successfully, but these errors were encountered: