Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

replaced nullish CO with Logical OR#58

Merged
mattkingshott merged 1 commit intocaneara:masterfrom
UnleashedMySelf:master
Jul 31, 2023
Merged

replaced nullish CO with Logical OR#58
mattkingshott merged 1 commit intocaneara:masterfrom
UnleashedMySelf:master

Conversation

@UnleashedMySelf
Copy link
Copy Markdown
Contributor

No description provided.

@mattkingshott
Copy link
Copy Markdown
Contributor

Are there any other additional things that we should consider when using logical OR?

I’m just wondering if the fallback value would be used when it might not otherwise be expected for existing applications that are relying on null coalescing e.g. if default field name were 0.

@UnleashedMySelf
Copy link
Copy Markdown
Contributor Author

@mattkingshott
to be honest, who will set default_field_name to 0? it's good that the function of setting the default_field_name was added, at least for multilingualism, but no one will set the default_field_name name to 0 .. and even if they do, it's their choice. we do not get this value in any way, but only manually we can set it

if you are still worried about it, we can replace it with:

? message.replace('[FIELD]', this.default_field_name !== null && this.default_field_name !== undefined ? this.default_field_name || 'Value')

@mattkingshott
Copy link
Copy Markdown
Contributor

That’s fine as is. I’m probably just overthinking it. I’ll do a new build tomorrow

@mattkingshott mattkingshott merged commit 6b93e81 into caneara:master Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants