Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make library compatible with workers
When using Handlebars in a Cloudflare Worker, an environment in which the `window` and `global` objects both don't exist, an error is thrown about `window` being undefined. According to the ECMA specification, only `self` is available in a worker. Since we support old runtimes in our 4.x branch, we can't use `globalThis` but have to use a polyfill.
- Loading branch information