-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: bug toast message for when export default is not present in js object. #36296
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
Closed
prasad-madine
wants to merge
6
commits into
appsmithorg:release
from
prasad-madine:fix/bug-fix-toast-message-for-when-export-default-is-not-present-in-js-object-36185
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ae5801f
fix: bug toast message for when export default is not present in js o…
prasad-madine 9e6364c
fix: removed at:JS Object path from toast message
prasad-madine 4161ef0
fix: Added unit test cases and added raw text to messages file
prasad-madine 219e69f
Merge branch 'release' of https://github.com/PrasadMadine/appsmith in…
prasad-madine 5c02876
Merge branch 'release' of https://github.com/PrasadMadine/appsmith in…
prasad-madine 0dc86b0
fix: linting errors
prasad-madine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Class, let's examine the changes in our error handling.
Now, students, I want you to pay close attention to how we've simplified our error message construction. This is a good step towards clarity, but we have a small issue to address.
The simplification of the error message is commendable. We've removed the entity name from the context, focusing solely on the error message itself. This can make the error more concise and easier to understand.
However, we have a little redundancy in our code. Can anyone spot it? Yes, you in the back! That's right, the double negation in the condition
!!error.contextis unnecessary. Remember, class, JavaScript will automatically coerce the value to a boolean in an if statement. Let's clean that up.Lastly, notice how we're now using the same error message for both the toast notification and the console log. Consistency is key in error reporting, children!
Let's make a small correction to improve our code:
This change will make our code cleaner and easier to read. Remember, class, always strive for clarity and simplicity in your code!
📝 Committable suggestion
🧰 Tools
🪛 Biome