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

Compiling schema error #3792

Closed
4 tasks done
AlimovSV opened this issue Jul 27, 2023 · 3 comments · Fixed by #3794
Closed
4 tasks done

Compiling schema error #3792

AlimovSV opened this issue Jul 27, 2023 · 3 comments · Fixed by #3794
Labels

Comments

@AlimovSV
Copy link

Prerequisites

What theme are you using?

core

Version

5.5.2

Current Behavior

Playground example displays an error in the console:

Expected Behavior

The example should work without any error

Steps To Reproduce

Open the example, click any option for field and check the console output.

Environment

- OS: 
- Node:
- npm:

Anything else?

Looks like the problem with "const": null because with any other values (false for example) the example works fine. v5.5.2 and earlier work fine with this example but any later version display the error.

@AlimovSV AlimovSV added bug needs triage Initial label given, to be assigned correct labels and assigned labels Jul 27, 2023
@heath-freenome heath-freenome removed the needs triage Initial label given, to be assigned correct labels and assigned label Jul 28, 2023
@nickgros
Copy link
Contributor

Unminified stack trace:

Error encountered compiling schema: TypeError: schemaNode is null
    withIdRefPrefix withIdRefPrefix.ts:41
    withIdRefPrefixObject withIdRefPrefix.ts:16
    withIdRefPrefix withIdRefPrefix.ts:42
    isValid validator.ts:140
    getMatchingOption getMatchingOption.ts:90
    getFirstMatchingOption getFirstMatchingOption.ts:26
    allValidIndexes getClosestMatchingOption.ts:153
    getClosestMatchingOption getClosestMatchingOption.ts:151
    toPathSchemaInternal toPathSchema.ts:63
    toPathSchemaInternal toPathSchema.ts:89
    toPathSchema toPathSchema.ts:120
    toPathSchema createSchemaUtils.ts:276
    onSubmit Form.tsx:627
    ...

nickgros added a commit to nickgros/react-jsonschema-form that referenced this issue Jul 28, 2023
heath-freenome added a commit that referenced this issue Jul 28, 2023
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
@AlimovSV
Copy link
Author

@nickgros @heath-freenome Thank you for such a quick fix!

@heath-freenome
Copy link
Member

@AlimovSV you are welcome. Sometimes the fix is so readily apparent that making it takes no time.

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 a pull request may close this issue.

3 participants