Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for when global and window object both not found. #1894

Merged
merged 1 commit into from
Oct 16, 2022

Commits on Oct 16, 2022

  1. 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.
    marnixk authored and jaylinski committed Oct 16, 2022
    Configuration menu
    Copy the full SHA
    07b9ed2 View commit details
    Browse the repository at this point in the history