|
@@ -130,7 +130,7 @@ class Webshot extends CallableInstance<[Tweets, (...args) => void, number], Prom
|
|
.then(sensitiveToggles => {
|
|
.then(sensitiveToggles => {
|
|
const count = sensitiveToggles.length;
|
|
const count = sensitiveToggles.length;
|
|
if (count) logger.info(`found ${count} sensitive ${count === 1 ? 'tweet' : 'tweets'} on page, uncollapsing...`);
|
|
if (count) logger.info(`found ${count} sensitive ${count === 1 ? 'tweet' : 'tweets'} on page, uncollapsing...`);
|
|
- return Promise.all(sensitiveToggles.map(toggle => toggle.click()));
|
|
|
|
|
|
+ return chainPromises(sensitiveToggles.filter(toggle => toggle.isVisible()).map(toggle => () => toggle.click()));
|
|
})
|
|
})
|
|
.then(() => handle)
|
|
.then(() => handle)
|
|
)
|
|
)
|