Stopping sending literal errors

Errors now must be of "Error" type.
Rule added in eslint.
This commit is contained in:
David Négrier
2022-01-06 10:49:44 +01:00
parent 88509916a8
commit ab0f5e9837
19 changed files with 31 additions and 28 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ export function getNavigatorType(): NavigatorType {
} else if (window.navigator.userAgent.includes("Safari")) {
return NavigatorType.safari;
}
throw "Couldn't detect navigator type";
throw new Error("Couldn't detect navigator type");
}
export function isAndroid(): boolean {
return window.navigator.userAgent.includes("Android");