change || to ??

This commit is contained in:
2026-04-11 19:15:01 +07:00
parent ac40097bdd
commit fab72e86a6
12 changed files with 23 additions and 28 deletions

View File

@@ -22,7 +22,7 @@ exports.api = async (req, res) => {
return res.status(404).json({ error: "Contact data not found" });
}
const baseUrl =
process.env.BACKEND_URL || `${req.protocol}://${req.get("host")}`;
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(contact, baseUrl);
res.json(processedData);
} catch (err) {