Skip to content

Commit 2c0584a

Browse files
authored
Add missing check for ENVIRONMENT_MAY_BE_WORKER. NFC (#22082)
1 parent 404fde0 commit 2c0584a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/web_or_worker_shell_read.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: MIT
55
*/
66

7+
#if ENVIRONMENT_MAY_BE_WORKER
78
if (ENVIRONMENT_IS_WORKER) {
89
readBinary = (url) => {
910
var xhr = new XMLHttpRequest();
@@ -13,6 +14,7 @@
1314
return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));
1415
};
1516
}
17+
#endif
1618

1719
readAsync = (url) => {
1820
#if ENVIRONMENT_MAY_BE_WEBVIEW

0 commit comments

Comments
 (0)