-
Notifications
You must be signed in to change notification settings - Fork 22
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
Strict null checks -- 90% #8863
Conversation
Playwright test resultsDetails Open report ↗︎ Flaky testsedgeSetup › setup/unaffiliated.setup.ts › authenticate with unaffiliated user Skipped testschrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8863 +/- ##
==========================================
+ Coverage 74.24% 74.38% +0.13%
==========================================
Files 1332 1340 +8
Lines 40817 41198 +381
Branches 7634 7710 +76
==========================================
+ Hits 30306 30646 +340
- Misses 10511 10552 +41 ☔ View full report in Codecov by Sentry. |
src/pageEditor/documentBuilder/preview/elementsPreview/Card.tsx
Outdated
Show resolved
Hide resolved
@@ -149,13 +152,17 @@ function useSaveMod(): ModSaver { | |||
(x) => x.name === newMod.metadata.id, | |||
)?.id; | |||
|
|||
assertNotNullish(packageId, "Package ID is required to upsert a mod"); |
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.
Same question, are we sure we want this function to throw an error if the callback is used before the RTK Query request finishes, as opposed to silently returning early / no-op?
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.
In this case, I think we do want an error, because editablePackages would already be loaded by the time we get here. So the packageId generally can't be found
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.
Just had a few nit picks 👍
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
What does this PR do?
For more information on our expectations for the PR process, see the
code review principles doc