mirror of
https://github.com/noodlapp/noodl.git
synced 2026-01-10 14:22:51 +01:00
fix: version control panel - show correct state when a push is rejected (#23)
This commit is contained in:
@@ -324,6 +324,11 @@ export function GitStatusButton({ openGitSettingsPopout }: GitStatusButtonProps)
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ToastLayer.showError('Failed to push. ' + error);
|
ToastLayer.showError('Failed to push. ' + error);
|
||||||
|
|
||||||
|
// If the error is a rejected push, we need to fetch again to get the latest state where we can pull and rebase
|
||||||
|
if (error?.toString().includes('rejected')) {
|
||||||
|
await fetchRemote();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user