-
Notifications
You must be signed in to change notification settings - Fork 4k
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(api,framework): Undefined variables parsing #8041
Conversation
✅ Deploy Preview for dashboard-v2-novu-staging canceled.
|
b45d4c9
to
bc6eaf4
Compare
commit: |
bc6eaf4
to
3fbe5fd
Compare
3fbe5fd
to
893b486
Compare
@@ -20,6 +20,6 @@ const stringifyDataStructureWithSingleQuotes = (value: unknown, spaces: number = | |||
|
|||
return valueEscapedNewLines; | |||
} else { | |||
return String(value); | |||
return value == null ? '' : String(value as unknown); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this shortcut, but because this is very sensitive part i wonder if we should go with the more explicit version "value === null || value === undefined" instead.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's different with that version ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String(value) when value is undefined returns undefined
. Isn't that the reason we started this PR in the first place?
893b486
to
5f27209
Compare
5f27209
to
184e0e9
Compare
What changed? Why was the change needed?
Screenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer