Skip to content

Conversation

@Bitshifter-9
Copy link
Contributor

This PR fixes a bug in checkDefault where the code was checking typeof field instead of typeof field.default. Because of that, nullable fields with a default value of "null" were being incorrectly flagged as invalid.

What i was fixed

Updated the condition to correctly check typeof field.default, allowing "null" defaults to pass validation as intended.

Verification

I reproduced the issue using a standalone script (repro_bug_standalone.js):

Before the fix: "null" defaults were incorrectly flagged.

After the fix: The check works as expected.

This brings the behavior of checkDefault back in line with how nullable fields should be handled.
fixes #779

@vercel
Copy link

vercel bot commented Dec 2, 2025

@Bitshifter-9 is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Bitshifter-9
Copy link
Contributor Author

@1ilit can you check once

@1ilit 1ilit merged commit b2b0ecf into drawdb-io:main Dec 4, 2025
2 of 3 checks passed
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.

checkDefault incorrectly flags "null" default values

2 participants