0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Protected against missing NODE_ENV variable

- in the event NODE_ENV isn't set, this would throw an error because
  `startsWith` is a function call on `undefined`
This commit is contained in:
Daniel Lockyer 2022-08-18 08:33:11 +02:00
parent 0f998e30aa
commit ae336f19cd
No known key found for this signature in database
GPG key ID: D21186F0B47295AD

View file

@ -2,7 +2,7 @@ const bcrypt = require('bcryptjs');
let HASH_ROUNDS = 10;
if (process.env.NODE_ENV.startsWith('testing')) {
if (process.env.NODE_ENV?.startsWith('testing')) {
HASH_ROUNDS = 1;
}