nevware21 / ts-utils

Common JavaScript functions for TypeScript
MIT License
4 stars 1 forks source link

[Bug] The createRangeIterator() function is getting mis-optimized for a worker on chrome. #300

Closed nev21 closed 1 month ago

nev21 commented 3 months ago

The createRangeIterator() function is getting mis-optimized via rollup / karma for the worker tests causing the presence of an unexpected ;. This appears to have been caused by the partially optimized code created, expanding out to an if () results in the correct behavior during testing.

Chrome Headless 126.0.6478.182 (Linux x86_64) ERROR [karma-mocha-webworker] RPCRequestError: Unexpected token ';' at RPCRequestError: Unexpected token ';' at node_modules/karma-mocha-webworker/karma-mocha-webworker-client/adapter.js:4234:57 Caused by Remote SyntaxError: Unexpected token ';' at Object.importScripts (node_modules/karma-mocha-webworker/karma-mocha-webworker-client/worker.js:109:47) at node_modules/karma-mocha-webworker/karma-mocha-webworker-client/worker.js:3400:35