Skip to content

Commit

Permalink
Add size limit to description for edge
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Sep 8, 2024
1 parent 7064d3f commit 17cbd06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ module.exports = env => {
parsed.Description.message = parsed.Description.message.slice(0, 77) + "...";
}
}

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));
}
Expand Down

0 comments on commit 17cbd06

Please sign in to comment.