Merge pull request #3620 from mempool/mononaut/fix-rtl-unfurls

Fix RTL locale unfurls
This commit is contained in:
wiz 2023-07-12 18:17:01 +09:00 committed by GitHub
commit faf85d0c82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,10 @@ class Server {
page.waitForSelector('meta[property="og:preview:fail"]', { timeout: config.PUPPETEER.RENDER_TIMEOUT || 3000 }).then(() => false)
])
if (success === true) {
const screenshot = await page.screenshot();
const screenshot = await page.screenshot({
captureBeyondViewport: false,
clip: { width: 1200, height: 600, x: 0, y: 0, scale: 1 },
});
return screenshot;
} else if (success === false) {
logger.warn(`failed to render ${path} for ${action} due to client-side error, e.g. requested an invalid txid`);