mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #13124 from Snuffleupagus/animationStarted-Node
Tweak the pre-processor condition, for Node.js environments, in the `animationStarted` helper (issue 13057)
This commit is contained in:
commit
39b485f69f
1 changed files with 2 additions and 2 deletions
|
@ -684,11 +684,11 @@ function waitOnEventOrTimeout({ target, name, delay = 0 }) {
|
|||
const animationStarted = new Promise(function (resolve) {
|
||||
if (
|
||||
typeof PDFJSDev !== "undefined" &&
|
||||
PDFJSDev.test("LIB && TESTING") &&
|
||||
PDFJSDev.test("LIB") &&
|
||||
typeof window === "undefined"
|
||||
) {
|
||||
// Prevent "ReferenceError: window is not defined" errors when running the
|
||||
// unit-tests in Node.js/Travis.
|
||||
// unit-tests in Node.js environments.
|
||||
setTimeout(resolve, 20);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue