From edd13895dd1d851c62d6262046f9d2f8092de32e Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 14 Apr 2023 11:41:18 +0200 Subject: [PATCH] Limit the `Path2D`-checks in the worker-thread to Node.js (PR 16238 follow-up, issue 16289) The changes in PR 16238 were intended specifically for Node.js environments, however they accidentally applied to older browsers as well. *Please note:* In up-to-date browsers `Path2D` is available in Workers, which should be connected to the introduction of `OffscreenCanvas`. --- src/core/worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/worker.js b/src/core/worker.js index 9569e8323..13a1af4e8 100644 --- a/src/core/worker.js +++ b/src/core/worker.js @@ -134,7 +134,7 @@ class WorkerMessageHandler { // a non-translated/non-polyfilled build of the library, since that would // quickly fail anyway because of missing functionality. if ( - typeof Path2D === "undefined" || + (isNodeJS && typeof Path2D === "undefined") || typeof ReadableStream === "undefined" ) { const partialMsg =