mirror of
https://github.com/noodlapp/noodl.git
synced 2026-01-09 22:02:53 +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 {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user