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 a bug for which is impossible to disable Hermes #34142

Closed
wants to merge 1 commit into from

Commits on Jul 6, 2022

  1. Fix a bug for which is impossible to disable Hermes

    Summary:
    The `||=` operator in an expression like `x = a ||= b` works in a way that:
    - if a is null, it assigns b to x
    - if a is `falsy`, it assigns b to x
    - otherwise, it assigns a to x.
    
    In our setup, if the user set `hermes_enabled` to `false` in the Podfile (one of the suggested way to disabled Hermes), the `options[:hermes_enabled]` part will evaluate to false and, therefore, `hermes_enabled` will obtain the value of `true`.
    
    ## Changelog
    
    [iOS][Changed] - Use the correct operator to decide whether Hermes is enabled or not.
    
    Differential Revision: D37643845
    
    fbshipit-source-id: 0a1705ef107d45b4039cf50049f573823186d953
    Riccardo Cipolleschi authored and facebook-github-bot committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    0edb888 View commit details
    Browse the repository at this point in the history