Skip to content

Conversation

@vibranovsky
Copy link

No description provided.

if (shouldIncludeField(key, schema[key], { include, exclude })) {
const field = schema[key]
if (!field.label) field.label = camelCaseToLabel(key)
if (field.label === undefined || field.label === null) field.label = camelCaseToLabel(key)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (field.label === undefined || field.label === null) field.label = camelCaseToLabel(key)
if (field.label == null) field.label = camelCaseToLabel(key)

это устоявшийся способ проверить является ли undefined или null. И единственное допустимое использование слабого равно == в JS.

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.

2 participants