1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #3798 from Stromwerk/no-throw-literal

This commit is contained in:
Cody Robibero 2022-08-13 08:00:45 -06:00 committed by GitHub
commit 74ca9eb81a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -42,6 +42,7 @@ module.exports = {
'indent': ['error', 4, { 'SwitchCase': 1 }],
'jsx-quotes': ['error', 'prefer-single'],
'keyword-spacing': ['error'],
'no-throw-literal': ['error'],
'max-statements-per-line': ['error'],
'no-duplicate-imports': ['error'],
'no-empty-function': ['error'],

View file

@ -19,7 +19,7 @@ import globalize from './globalize';
// "00", "00", ".000", "Z", undefined, undefined, undefined]
if (!d) {
throw "Couldn't parse ISO 8601 date string '" + s + "'";
throw new Error("Couldn't parse ISO 8601 date string '" + s + "'");
}
// parse strings, leading zeros into proper ints