Sentry fix: Make sure we don’t call utf7.imap.encode with a number

This commit is contained in:
Ben Gotow 2025-07-15 10:16:16 -05:00
parent 307dbfda32
commit d34468a0b9

View file

@ -25,7 +25,7 @@ export class SyncbackCategoryTask extends Task {
static forCreating({ name, accountId }: { name: string; accountId: string }) {
return new SyncbackCategoryTask({
path: utf7.imap.encode(name),
path: utf7.imap.encode(String(name)),
accountId: accountId,
});
}
@ -41,7 +41,7 @@ export class SyncbackCategoryTask extends Task {
}) {
return new SyncbackCategoryTask({
existingPath: path,
path: utf7.imap.encode(newName),
path: utf7.imap.encode(String(newName)),
accountId: accountId,
});
}
@ -52,7 +52,7 @@ export class SyncbackCategoryTask extends Task {
label() {
return this.existingPath
? localized(`Renaming %@`, utf7.imap.decode(this.existingPath))
: localized(`Creating %@`, utf7.imap.decode(this.path));
? localized(`Renaming %@`, utf7.imap.decode(String(this.existingPath)))
: localized(`Creating %@`, utf7.imap.decode(String(this.path)));
}
}