Jelajahi Sumber

Fix checking the existence of custom domain

poeti8 7 tahun lalu
induk
melakukan
775a9b8bbe
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      server/controllers/urlController.js

+ 1 - 1
server/controllers/urlController.js

@@ -229,7 +229,7 @@ exports.setCustomDomain = async ({ body, user }, res) => {
     body.homepage &&
     (URL.parse(body.homepage).protocol ? body.homepage : `http://${body.homepage}`);
   const { email } = await getCustomDomain({ customDomain });
-  if (email !== user.email) {
+  if (email && email !== user.email) {
     return res
       .status(400)
       .json({ error: 'Domain is already taken. Contact us for multiple users.' });