Skip to content

Commit

Permalink
chore: fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Nov 27, 2024
1 parent be1ddbd commit fa50e82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/create-vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ async function init() {
}),
},
{
type: 'select',
type: (framework: Framework | /* package name */ string) =>
typeof framework === 'object' ? 'select' : null,
name: 'variant',
message: reset('Select a variant:'),
choices: (framework: Framework) =>
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/shared/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ export class HMRContext implements ViteHotContext {
// extracted in the server for propagation
acceptExports(
_: string | readonly string[],
callback: (data: any) => void,
callback?: (data: any) => void,
): void {
this.acceptDeps([this.ownerPath], ([mod]) => callback(mod))
this.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod))
}

dispose(cb: (data: any) => void): void {
Expand Down

0 comments on commit fa50e82

Please sign in to comment.