Skip to content
Snippets Groups Projects
Commit 4430983e authored by Jure's avatar Jure
Browse files

Safely fall back if config.validations is not provided

parent f737be84
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,13 @@ const logger = require('@pubsweet/logger')
const config = require('config')
const appValidations = require(config.validations)
const validations = require('./validations')(appValidations)
let validations
if (config.validations) {
const appValidations = require(config.validations)
validations = require('./validations')(appValidations)
} else {
validations = require('./validations')()
}
schema()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment