Skip to content

Commit 58f38d8

Browse files
committed
address gemini
1 parent c9f9aa1 commit 58f38d8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

components/sections/migrate/deep-scan-modal.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ export function DeepScanModal({
148148

149149
const handleClose = () => {
150150
if (isCompleted) {
151-
onDone?.()
151+
if (typeof onDone === 'function') {
152+
onDone()
153+
}
152154
return
153155
}
154156
// Just close the modal without canceling the scan
@@ -399,13 +401,7 @@ export function DeepScanModal({
399401

400402
<DialogFooter>
401403
{isCompleted ? (
402-
<Button
403-
onClick={() => {
404-
onDone?.()
405-
}}
406-
>
407-
Done
408-
</Button>
404+
<Button onClick={onDone}>Done</Button>
409405
) : isScanning ? (
410406
<Button variant="outline" onClick={onCancel} disabled={isCancelling}>
411407
{isCancelling ? 'Cancelling...' : 'Cancel Scan'}

0 commit comments

Comments
 (0)