From 8d15c4e724a65347a999f31486f72bdbd9d38812 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 2 Apr 2020 10:45:19 -0700 Subject: set unit conditionally --- routes/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/users.js b/routes/users.js index 4644cc06..725a14e7 100644 --- a/routes/users.js +++ b/routes/users.js @@ -170,7 +170,7 @@ app.post("/user", auth, async (req, res) => { }); } - user.unit = unit; + if (unit) user.unit = unit; user.currency = currency; user.currencies = currencies; -- cgit v1.2.3