Skip to content

Commit ae36f6d

Browse files
committed
Dont need to wait for screenshot taking
1 parent 408877d commit ae36f6d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

frontend/src/components/chat/code-engine/project-context.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -544,16 +544,14 @@ export function ProjectProvider({ children }: { children: ReactNode }) {
544544
const blob = new Blob([arrayBuffer], { type: 'image/png' });
545545
const file = new File([blob], 'screenshot.png', { type: 'image/png' });
546546

547-
if (isMounted.current) {
548-
await updateProjectPhotoMutation({
549-
variables: {
547+
await updateProjectPhotoMutation({
548+
variables: {
550549
input: {
551-
projectId,
552-
file,
553-
},
550+
projectId,
551+
file,
554552
},
555-
});
556-
}
553+
},
554+
});
557555
} catch (error) {
558556
logger.error('Error taking screenshot:', error);
559557
} finally {

0 commit comments

Comments
 (0)