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

🐛 426 bug enable json comparison #437

Merged
merged 8 commits into from
May 5, 2022
Merged

Conversation

xoscar
Copy link
Collaborator

@xoscar xoscar commented May 5, 2022

This PR fixes a bug we had when trying to compare json strings.

Changes

  • Add an isJson check to validate if the incoming value can be parsed.

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Screenshots

Screen Shot 2022-05-05 at 9 54 49 a m

@xoscar xoscar added the frontend label May 5, 2022
@xoscar xoscar added this to the MVProduct milestone May 5, 2022
@xoscar xoscar self-assigned this May 5, 2022
@xoscar xoscar linked an issue May 5, 2022 that may be closed by this pull request
@@ -11,7 +11,7 @@ const ErrorBoundary: React.FC<IErrorBoundaryProps> = ({error}) => {
<S.Container>
<CloseCircleFilled style={{color: 'red', fontSize: 32}} />
<Typography.Title level={2}>Something went wrong!</Typography.Title>
<div style={{display: 'grid', gap: 8, gridTemplateColumns: '1fr 1fr'}}>{error.toString()}</div>
<div style={{display: 'flex', maxWidth: '800px', padding: '24px'}}>{error.toString()}</div>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixing the style for the error boundary message

}

return `value ${compareOperator} \`${comparisonValue}\``;
if (isJson(comparisonValue)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Checking if its a potential JSON

@xoscar xoscar merged commit e00f6c9 into main May 5, 2022
@xoscar xoscar deleted the 426-bug-enable-json-comparison branch May 5, 2022 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Enable JSON comparison
1 participant