server-ts: Convert routes/api/attributes

This commit is contained in:
Elian Doran
2024-04-05 20:22:10 +03:00
parent 9330241045
commit c0349b3f84
2 changed files with 39 additions and 23 deletions

View File

@@ -137,7 +137,10 @@ export default class Becca {
return branch;
}
getAttribute(attributeId: string): BAttribute | null {
getAttribute(attributeId: string | null): BAttribute | null {
if (!attributeId) {
return null;
}
return this.attributes[attributeId];
}