From bddbce1dfe68e324a1262b0d256a7b4542636e10 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Mon, 2 Oct 2023 21:35:04 +0300 Subject: [PATCH] fix --- src/editor/share_dialog.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/editor/share_dialog.js b/src/editor/share_dialog.js index 12cc6b4..41830e8 100644 --- a/src/editor/share_dialog.js +++ b/src/editor/share_dialog.js @@ -66,10 +66,10 @@ export class ShareDialog { this.uploading.style.display = '' this.upload_begin.style.display = 'none' try { - const id = await save_share(get_state().files['']) - this.url = new URL(window.location) - this.url.searchParams.append('share_id', id) - this.url_share.value = this.url + await save_share(get_state().files['']) + // window location was changed inside save_share, now it points out to a + // new share + this.url_share.value = window.location.toString() this.upload_finish.style.display = '' } catch(e) { alert(e.message)