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] runtime: properly support t-foreach on strings #1509

Merged
merged 1 commit into from
Aug 25, 2023

Commits on Aug 9, 2023

  1. [FIX] runtime: properly support t-foreach on strings

    Previously, support for iterables was added to t-foreach. The idea was
    that anything that you can spread or on which you can use for..of would
    be supported. Due to an implementation mistakes, strings, which are
    iterable were not supported because we checked that the typeof the
    iterable was 'object'.
    
    To fix this, we coerce the iterable to an object and check whether that
    coerced value has a Symbol.iterator property, which is what happens
    behind the scenes when using for..of or spreading a primitive.
    
    Closes: #1503
    sdegueldre committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    b26a907 View commit details
    Browse the repository at this point in the history