Skip to content

fix: incorrect point free function call#1697

Merged
IWANABETHATGUY merged 2 commits intomainfrom
fix/incorrect-point-free
Jul 23, 2024
Merged

fix: incorrect point free function call#1697
IWANABETHATGUY merged 2 commits intomainfrom
fix/incorrect-point-free

Conversation

@IWANABETHATGUY
Copy link
Member

@IWANABETHATGUY IWANABETHATGUY commented Jul 23, 2024

Description

  1. At the beginning, I want the code more point free, but it is wrong in javascript, which would throw a runtime error
TypeError: Method Set.prototype.has called on incompatible receiver undefined
    at has (<anonymous>)
    at Array.forEach (<anonymous>)

unless you write the code like:

  if (Object.keys(plugin).some(Set.prototype.has.bind(unsupportedHooks))) {
    return false
  }

This is ugly either, so let's revert it.

@netlify
Copy link

netlify bot commented Jul 23, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 5d4b64c
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/669fb7fd74df080008dba4cb

@IWANABETHATGUY IWANABETHATGUY changed the title fix: 🐛 incorrect point free function call fix: incorrect point free function call Jul 23, 2024
@IWANABETHATGUY IWANABETHATGUY self-assigned this Jul 23, 2024
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review July 23, 2024 14:04
@IWANABETHATGUY IWANABETHATGUY enabled auto-merge July 23, 2024 14:04
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue Jul 23, 2024
Merged via the queue into main with commit 4fb7ab6 Jul 23, 2024
@IWANABETHATGUY IWANABETHATGUY deleted the fix/incorrect-point-free branch July 23, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant