-
Notifications
You must be signed in to change notification settings - Fork 7.7k
fix: missing await for an async function call #4035
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
Conversation
|
WalkthroughThe recent changes enhance the asynchronous capabilities of various functions within the hooks and store modules. Functions like Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TabbarStore
participant Router
User->>TabbarStore: Call refresh()
TabbarStore-->>Router: Refresh tabs
Router-->>TabbarStore: Tabs refreshed
TabbarStore-->>User: Refresh completed
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- packages/effects/hooks/src/use-refresh.ts (1 hunks)
- packages/effects/hooks/src/use-tabs.ts (1 hunks)
- packages/effects/hooks/src/use-watermark.ts (1 hunks)
- packages/stores/src/modules/tabbar.ts (1 hunks)
Additional comments not posted (5)
packages/effects/hooks/src/use-refresh.ts (1)
9-10
: LGTM! The function is now properly handling asynchronous operations.The change to make the
refresh
function asynchronous and await thetabbarStore.refresh(router)
call ensures that the function handles asynchronous operations correctly.packages/effects/hooks/src/use-watermark.ts (2)
51-51
: LGTM! The function is now properly handling asynchronous operations.The change to await the
watermark.value?.create()
call ensures that theinitWatermark
function handles asynchronous operations correctly.
55-62
: LGTM! The function is now properly handling asynchronous operations.The change to handle asynchronous operations more robustly in the
updateWatermark
function ensures that the function handles asynchronous operations correctly.packages/effects/hooks/src/use-tabs.ts (1)
47-47
: LGTM! The function is now properly handling asynchronous operations.The change to await the
tabbarStore.openTabInNewWindow(tab || route)
call ensures that theopenTabInNewWindow
function handles asynchronous operations correctly.packages/stores/src/modules/tabbar.ts (1)
352-352
: LGTM! The function is now synchronous.The removal of the
async
keyword simplifies thesetUpdateTime
function, as it no longer handles asynchronous operations. This change is appropriate given the function's current behavior.
Description
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit
New Features
Bug Fixes
Refactor