Add size limit to description for edge

This commit is contained in:
Ajay 2024-09-08 01:32:58 -04:00
parent 7064d3fe82
commit 17cbd068b9

View file

@ -171,6 +171,13 @@ module.exports = env => {
} }
} }
if (env.browser.toLowerCase() === "edge") {
parsed.Description.message = parsed.Description.message.match(/^.+(?=\. )/)?.[0] || parsed.Description.message;
if (parsed.Description.message.length > 132) {
parsed.Description.message = parsed.Description.message.slice(0, 129) + "...";
}
}
return Buffer.from(JSON.stringify(parsed)); return Buffer.from(JSON.stringify(parsed));
} }