Cache behavior for unknown type#624
Merged
artlowel merged 2 commits intoDSpace:masterfrom Mar 18, 2020
Merged
Conversation
… null The null object causes an exception further down the road
artlowel
reviewed
Mar 17, 2020
Member
artlowel
left a comment
There was a problem hiding this comment.
Thanks @benbosman
I had just one inline comment
| } else if (isRestDataObject(data)) { | ||
| const object = this.deserialize(data); | ||
| if (isNotEmpty(data._embedded)) { | ||
| if (isNotEmpty(data._embedded) && hasValue(object)) { |
Member
There was a problem hiding this comment.
Perhaps it makes more sense to move this hasValue(object) down to the if on line 60. That way even if the main object in a response can't be parsed, its embeds will still be processed.
… null The null object causes an exception further down the road
artlowel
approved these changes
Mar 18, 2020
Member
artlowel
left a comment
There was a problem hiding this comment.
Thanks @benbosman
Tested again, and it works.
4science-it
pushed a commit
to 4Science/dspace-angular
that referenced
this pull request
Nov 30, 2023
[DSC-1093] Added detect duplication label Approved-by: Giuseppe Digilio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a continuation of #611
We noticed the Angular UI currently also breaks in the BaseResponseParsingService.process() function if REST contains a type not (yet) known to Angular.
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
The null objects will be ignored here since there's on use in caching them