diff --git a/src/components/FormHelperComponent.ts b/src/components/FormHelperComponent.ts index 3f46ace..47527ca 100644 --- a/src/components/FormHelperComponent.ts +++ b/src/components/FormHelperComponent.ts @@ -37,7 +37,7 @@ export default class FormHelperComponent extends ApplicationComponent { router.use((req, res, next) => { if (['GET', 'POST'].find(m => m === req.method)) { - if (typeof req.body === 'object') { + if (typeof req.body === 'object' && Object.keys(req.body).length > 0) { req.flash('previousFormData', req.body); } }