payload icon indicating copy to clipboard operation
payload copied to clipboard

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

Open kpkonghk01 opened this issue 1 year ago • 0 comments

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 avatar May 18 '24 16:05 kpkonghk01