Explorar el Código

Fix checking the existence of custom domain

poeti8 hace 7 años
padre
commit
775a9b8bbe
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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.' });