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

@blueprintjs/core's ES5 "class" breaks @blink-mind/renderer-react's ES6 real class #7

Open
hyrious opened this issue Nov 9, 2021 · 0 comments

Comments

@hyrious
Copy link

hyrious commented Nov 9, 2021

You used @HotkeysTarget in @blink-mind/renderer-react, then exported it as an ES6 library. But the @blueprintjs/core is in ES5. Therefore, in ES6 context, this code:

_super.apply(this, arguments) // in @blueprintjs/core

will raise an error

Class constructor MindDragScrollWidget cannot be invoked without 'new'

This is definitely a bug of @blueprintjs/core, which should export valid es6 class. But when I searched their issues, I found palantir/blueprint#2972 unresolved 3 years ago. So I came here for help, maybe you can use useHotkeys as suggested in their source code, or try another hotkey bindings library.

I guess you didn't find this issue mainly because of using webpack, which transforms all code to ES5 under the hood.

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

No branches or pull requests

1 participant