Don't store edit session if no Continue On destination is selected (#159691)

This commit is contained in:
Joyce Er 2022-08-31 17:04:37 +00:00 committed by GitHub
parent 98c9c2543a
commit 29e6391a40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,12 +252,12 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
};
that.telemetryService.publicLog2<ContinueEditSessionEvent, ContinueEditSessionClassification>('editSessions.continue.store');
// Run the store action to get back a ref
const ref = await that.storeEditSession(false);
let uri = workspaceUri ?? await that.pickContinueEditSessionDestination();
if (uri === undefined) { return; }
// Run the store action to get back a ref
const ref = await that.storeEditSession(false);
// Append the ref to the URI
if (ref !== undefined) {
const encodedRef = encodeURIComponent(ref);