Remove force from git checkout & unselect version if checkout fails (#248)
#247
This commit is contained in:
@@ -72,7 +72,12 @@ export function VersionPane({ isVisible, onClose }: VersionPaneProps) {
|
||||
const handleVersionClick = async (versionOid: string) => {
|
||||
if (appId) {
|
||||
setSelectedVersionId(versionOid);
|
||||
await checkoutVersion({ appId, versionId: versionOid });
|
||||
try {
|
||||
await checkoutVersion({ appId, versionId: versionOid });
|
||||
} catch (error) {
|
||||
console.error("Could not checkout version, unselecting version", error);
|
||||
setSelectedVersionId(null);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -225,7 +225,6 @@ export function registerVersionHandlers() {
|
||||
fs,
|
||||
dir: appPath,
|
||||
ref: versionId,
|
||||
force: true,
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user