diff options
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r-- | server/helpers/utils.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts index 834d788c8..9efc89d92 100644 --- a/server/helpers/utils.ts +++ b/server/helpers/utils.ts | |||
@@ -113,7 +113,7 @@ const timeTable = { | |||
113 | week: 3600000 * 24 * 7, | 113 | week: 3600000 * 24 * 7, |
114 | month: 3600000 * 24 * 30 | 114 | month: 3600000 * 24 * 30 |
115 | } | 115 | } |
116 | export function parseDuration (duration: number | string, defaultDuration: number): number { | 116 | export function parseDuration (duration: number | string): number { |
117 | if (typeof duration === 'number') return duration | 117 | if (typeof duration === 'number') return duration |
118 | 118 | ||
119 | if (typeof duration === 'string') { | 119 | if (typeof duration === 'string') { |
@@ -130,8 +130,7 @@ export function parseDuration (duration: number | string, defaultDuration: numbe | |||
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | logger.error('Duration could not be properly parsed, defaulting to ' + defaultDuration) | 133 | throw new Error('Duration could not be properly parsed') |
134 | return defaultDuration | ||
135 | } | 134 | } |
136 | 135 | ||
137 | function resetSequelizeInstance (instance: Model<any>, savedFields: object) { | 136 | function resetSequelizeInstance (instance: Model<any>, savedFields: object) { |