Skip to content

Commit

Permalink
Trim the code when importing a profile
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
imatrisciano authored Jan 31, 2024
1 parent 01bf512 commit 13fd270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/Profiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 13fd270

Please # to comment.