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: Random blank pages for some NGDIL credentials #373

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

maiertech
Copy link
Member

@maiertech maiertech commented Sep 25, 2024

Description of change

Since the bug occurs during page rendering, I was unable to set a breakpoint and see what type of data is in a field when startsWith is invoked to check for a data URL. None of the credentialSubjects rendered with the DefaultRenderer contain anything other than string or something that can be coerced to a string.

Therefore, it is not clear why the DefaultRenderer should not be able to call startsWidth. To be on the safe side, it now checks if the type is string before checking if a field is a data URL.

Links to any relevant issues

How the change has been tested

Load the NGDIL credentials as described in #371 and test for every credential if it renders.

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@maiertech maiertech changed the title Explicitly check for type string before using startsWith fix: Random blank pages for some NGDIL credentials Sep 25, 2024
@maiertech maiertech self-assigned this Sep 25, 2024
@maiertech maiertech marked this pull request as ready for review September 25, 2024 15:30
@maiertech maiertech merged commit b110b96 into dev Sep 27, 2024
3 checks passed
@maiertech maiertech deleted the maiertech/issue372 branch September 27, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Credentials page is randomly blank
3 participants