-
Notifications
You must be signed in to change notification settings - Fork 365
Fix import form errors #9498
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 import form errors #9498
Conversation
Checked commit GilbertCherrie@6b099c4 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.62.0, and yamllint |
@@ -66,7 +66,7 @@ window.ImportSetup = { | |||
window.addEventListener('message', function(event) { | |||
var messageData = event.data.message; | |||
|
|||
if (messageData.level === 'error') { | |||
if (messageData && messageData.level === 'error') { |
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.
Can we use the chaining operator?
if (messageData && messageData.level === 'error') { | |
if (messageData?.level === 'error') { |
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.
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.
ugh why is Javascript so terrible - ok I guess back to the original code :(
Looks like it's in webpack 5
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 think a good solution is to upgrade webpack and babel packages. However, even with Webpack 4, we can enable optional chaining support by updating the Babel configuration to include the necessary transform plugin, as discussed here
@elsamaryv can you review please. |
this should go back... updated label |
Backported to
|
Fix import form errors (cherry picked from commit 94786b7)
This pr removes the constant error messages on the import form
Before:

After:
