Skip to content

Commit ce699c0

Browse files
committed
reset body style every 10 seconds
1 parent 4f12238 commit ce699c0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/api/instagram.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,15 @@ export class Instagram<PostType> extends EventEmitter {
666666
/* istanbul ignore next */
667667
await this.page.evaluate(() => {
668668
setInterval(() => {
669-
document.body.style.overflow = "";
670-
}, 30000);
669+
try {
670+
document.body.style.overflow = "";
671+
} catch (e) {
672+
// tslint:disable-next-line:no-console
673+
console.log("Failed to update style");
674+
// tslint:disable-next-line:no-console
675+
console.error(e.message);
676+
}
677+
}, 10000);
671678
});
672679
} catch (e) {
673680
// Increment attempts

0 commit comments

Comments
 (0)