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

syncFields check #1030

Merged
merged 2 commits into from
Dec 6, 2023
Merged

syncFields check #1030

merged 2 commits into from
Dec 6, 2023

Conversation

simon-leech
Copy link
Contributor

This PR adds a single line of code to address a small bug.
If syncFields is called for dependents that do not yet have a value - the response will be null.
If the response is null, then

this.infoj
    .filter(entry => typeof response[entry.field] !== 'undefined')

will error as the response contains nothing.
As such, I simply added a check on if response is null, just return before the filtering to remove this error.

@simon-leech simon-leech marked this pull request as ready for review December 6, 2023 09:46
@simon-leech simon-leech added the Bug A genuine bug. There must be some form of error exception to work with. label Dec 6, 2023
Copy link
Member

@dbauszus-glx dbauszus-glx left a comment

Choose a reason for hiding this comment

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

i added a check whether response is error.

Copy link

sonarcloud bot commented Dec 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@RobAndrewHurst RobAndrewHurst merged commit 7c0bd63 into GEOLYTIX:main Dec 6, 2023
6 checks passed
@simon-leech simon-leech deleted the syncfields-check branch February 9, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A genuine bug. There must be some form of error exception to work with.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants