Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Blank Screen when performing a Lookup #734

Merged
merged 2 commits into from Jun 17, 2019
Merged

Conversation

jgreben
Copy link
Contributor

@jgreben jgreben commented Jun 14, 2019

Fixes #712:
Similar to #684, if the lookup component has a defaultURI defined as an empty string, the TypeaheadComponent will expect a label to go along with that default and without one will crash. This PR redefines when the defaults should return an empty array to that component.

Fixes #718:
If the initial state of a redux resource object is undefined, and the defined property component assigns a shortid in the redux path, the component crashes when trying to filter on an undefined object in that path, so check for that in the reducer when reassigning state.

I ran across the bug surfaced in #718 while testing #712, so that's why this PR fixes both issues. I can split the PRs up if desired, but the changes here are not extensive.

@jgreben jgreben moved this from Done to Needs Review in Sinopia Work-Cycle One Jun 14, 2019
@jgreben jgreben changed the title Fix lookup again Fix Blank Screen when performing a Lookup Jun 14, 2019
Copy link
Contributor

@jermnelson jermnelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one comment.

src/reducers/inputs.js Outdated Show resolved Hide resolved
Check for undefined object for a key in CHANGE_SELECTIONS reducer
@jermnelson jermnelson merged commit e4e217a into master Jun 17, 2019
Sinopia Work-Cycle One automation moved this from Needs Review to Done Jun 17, 2019
@jermnelson jermnelson deleted the fix-lookup-again branch June 17, 2019 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
2 participants