Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

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

@hyrious

Description

@hyrious

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions