express-ext 0.5.10 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/http.ts +2 -2
package/package.json
CHANGED
package/src/http.ts
CHANGED
|
@@ -245,11 +245,11 @@ export function getRequiredDate(req: Request, res: Response, name: string): Date
|
|
|
245
245
|
return date
|
|
246
246
|
}
|
|
247
247
|
export function getDate(req: Request, name: string, d?: Date): Date | undefined {
|
|
248
|
-
const v = req.params[name]
|
|
248
|
+
const v = req.params[name] as string
|
|
249
249
|
if (!v || v.length === 0) {
|
|
250
250
|
return d
|
|
251
251
|
}
|
|
252
|
-
const date = new Date(v)
|
|
252
|
+
const date = new Date(v as string)
|
|
253
253
|
if (date.toString() === "Invalid Date") {
|
|
254
254
|
return d
|
|
255
255
|
}
|