From 13fd2707865acca8c9e5cff6eb8615571fe1775a Mon Sep 17 00:00:00 2001 From: imatrisciano <31051418+imatrisciano@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:49:08 +0100 Subject: [PATCH] Trim the code when importing a profile When sharing a profile code with friends sometimes extra spaces are copied alongside the id. If that's the case a 404 error will be generated. This commit adds a trim() to the code to remove any whitespaces. --- src/pages/Profiles.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Profiles.vue b/src/pages/Profiles.vue index 2830e5e9c..855f7699e 100644 --- a/src/pages/Profiles.vue +++ b/src/pages/Profiles.vue @@ -479,7 +479,7 @@ export default class Profiles extends Vue { async importProfileUsingCode() { try { - const filepath = await ProfileImportExport.downloadProfileCode(this.profileImportCode); + const filepath = await ProfileImportExport.downloadProfileCode(this.profileImportCode.trim()); await this.importProfileHandler([filepath]); } catch (e: any) { this.showError(R2Error.fromThrownValue(e, "Failed to import profile"));