Giter Site home page Giter Site logo

Comments (6)

jessebeach avatar jessebeach commented on May 27, 2024 1

Found it. I'm adding a test case and getting this fixed.

from jsx-ast-utils.

ljharb avatar ljharb commented on May 27, 2024

What's the code that triggers this?

from jsx-ast-utils.

7yp0 avatar 7yp0 commented on May 27, 2024

I was able to narrow it down to this bit:

<NavListItem
  data-tracking-button="context-share"
  title={this.shareLabel}
  iconRight="sharing"
  onClick={(this.handleSharingOverlayShow: any)}
  divider
/>

so basically a type cast to any in an onClick.

I was able to fix this by doing the type cast beforehand.
const handleSharingOverlayShow: any = this.handleSharingOverlayShow;

Thanks for the pointer!
I didn't know, that this was caused by something in our code.

Would be nice to have a more detailed error message, or eslint rule for this though.

I will close this, thanks :) 👍

from jsx-ast-utils.

ljharb avatar ljharb commented on May 27, 2024

I think this should be reopened; the rule shouldn’t crash on that.

from jsx-ast-utils.

7yp0 avatar 7yp0 commented on May 27, 2024

Good Point

from jsx-ast-utils.

jessebeach avatar jessebeach commented on May 27, 2024

@7yp0 , Fixed in version v2.2.1. This will log an error in the console, but it will no longer throw.

from jsx-ast-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.