дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 03:05:40 +02:00
fix(vcs): Skip the Git Log diff preview when it cannot open
Цей коміт міститься в:
1 джерело
f1ff2731f0
коміт
cfc916bfdb
1 file changed
+3
-1
@@ -1123,7 +1123,9 @@ export function CommitDetails({ commits }: { commits: Commit[] }) {
|
||||
clearTimeout(previewTimer.current);
|
||||
if (!logOptions().diffPreview || sel.size !== 1) return;
|
||||
const file = fileNodeAt(tree, [...sel][0]!)?.file;
|
||||
if (file) previewTimer.current = setTimeout(() => void showChangesDiff([file], true), PREVIEW_DELAY);
|
||||
// A preview that cannot open (no editor yet, the file went away) is just skipped.
|
||||
if (file)
|
||||
previewTimer.current = setTimeout(() => void showChangesDiff([file], true).catch(() => undefined), PREVIEW_DELAY);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Заблокувати користувача