mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
rollback debug change
This commit is contained in:
20
src/app/core/cache/builders/link.service.ts
vendored
20
src/app/core/cache/builders/link.service.ts
vendored
@@ -55,20 +55,16 @@ export class LinkService {
|
||||
parent: this.parentInjector
|
||||
}).get(provider);
|
||||
|
||||
const link = model._links[matchingLinkDef.linkName];
|
||||
const href = model._links[matchingLinkDef.linkName].href;
|
||||
|
||||
if (hasValue(link)) {
|
||||
const href = link.href;
|
||||
|
||||
try {
|
||||
if (matchingLinkDef.isList) {
|
||||
model[linkToFollow.name] = service.findAllByHref(href, linkToFollow.findListOptions, ...linkToFollow.linksToFollow);
|
||||
} else {
|
||||
model[linkToFollow.name] = service.findByHref(href, ...linkToFollow.linksToFollow);
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(`Something went wrong when using @dataService(${matchingLinkDef.resourceType.value}) ${hasValue(service) ? '' : '(undefined) '}to resolve link ${linkToFollow.name} from ${href}`);
|
||||
try {
|
||||
if (matchingLinkDef.isList) {
|
||||
model[linkToFollow.name] = service.findAllByHref(href, linkToFollow.findListOptions, ...linkToFollow.linksToFollow);
|
||||
} else {
|
||||
model[linkToFollow.name] = service.findByHref(href, ...linkToFollow.linksToFollow);
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(`Something went wrong when using @dataService(${matchingLinkDef.resourceType.value}) ${hasValue(service) ? '' : '(undefined) '}to resolve link ${linkToFollow.name} from ${href}`);
|
||||
}
|
||||
}
|
||||
return model;
|
||||
|
Reference in New Issue
Block a user