Stopping sending literal errors
Errors now must be of "Error" type. Rule added in eslint.
This commit is contained in:
@@ -26,7 +26,7 @@ export interface ChatMessage {
|
||||
function getAuthor(authorId: number): PlayerInterface {
|
||||
const author = playersStore.getPlayerById(authorId);
|
||||
if (!author) {
|
||||
throw "Could not find data for author " + authorId;
|
||||
throw new Error("Could not find data for author " + authorId);
|
||||
}
|
||||
return author;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user