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

Don't "unset" open and require after the init context #3645

Merged
merged 1 commit into from Apr 4, 2024

Commits on Mar 18, 2024

  1. Don't "unset" open and require after the init context

    This was done to prevent them to be used outside of the init context,
    except that this wasn't enough as you can save them to another variable.
    
    More fixes have been added on top - but in reality there is no need to
    unset them.
    
    If anything this makes it harder for users to figure out what happens as
    in the case of `require` it will tell you that you can't call
    `undefined`.
    
    For `open` this was handled by setting it to a function that just
    reports it can't be used outside the init context. But this is already
    the case if it isn't unset and then reset to this function.
    
    So this change makes the whole thing more consistent and doesn't do a
    bunch of additional and unnecessary operations.
    mstoykov committed Mar 18, 2024
    Copy the full SHA
    020624e View commit details
    Browse the repository at this point in the history