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

[3.0.0-beta.34] incorrect import of isHotkey in richtext-slate plugin #6421

Closed
kpkonghk01 opened this issue May 18, 2024 · 1 comment
Closed
Assignees
Labels
status: needs-triage Possible bug which hasn't been reproduced yet v3

Comments

@kpkonghk01
Copy link
Contributor

Link to reproduction

https://github.com/AoiYamada/unclaimed-store

Describe the Bug

isHotkey is not a function:

Screenshot 2024-05-18 at 11 56 39 PM

https://github.com/payloadcms/payload/blob/beta/packages/richtext-slate/src/field/RichText.tsx#L18

maybe

import isHotkey from 'is-hotkey'

should be changed to

import { isHotkey } from 'is-hotkey'

after upgrade to payload 3

To Reproduce

Install deps,

then
docker compose up -d

go to
http://localhost:3000/admin/collections/pages

create new page

type anything in the rich text editor will trigger this error like this:

Screenshot 2024-05-19 at 12 09 44 AM

Payload Version

3.0.0-beta.34

Adapters and Plugins

db-mongodb, richtext-slate

@kpkonghk01 kpkonghk01 added the status: needs-triage Possible bug which hasn't been reproduced yet label May 18, 2024
@denolfe denolfe added the v3 label May 22, 2024
@denolfe denolfe self-assigned this May 22, 2024
denolfe added a commit that referenced this issue May 22, 2024
Fixes webpack issue with isHotkey: `TypeError:
is_hotkey__WEBPACK_IMPORTED_MODULE_9__ is not a function`

Changing this from a default import to a named export, and it appears to
resolve the issue.

Fixes #6421
@denolfe
Copy link
Member

denolfe commented May 22, 2024

Closed by #6466

@denolfe denolfe closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet v3
Projects
None yet
Development

No branches or pull requests

2 participants