Skip to content

Commit 73d0b20

Browse files
authored
fix: isHotkey webpack error (#6466)
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
1 parent 1fe9790 commit 73d0b20

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

packages/richtext-slate/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"devDependencies": {
4343
"@payloadcms/eslint-config": "workspace:*",
4444
"@payloadcms/ui": "workspace:*",
45+
"@types/is-hotkey": "^0.1.10",
4546
"@types/node": "20.12.5",
4647
"@types/react": "18.3.2",
4748
"payload": "workspace:*"

packages/richtext-slate/src/field/RichText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { useField } from '@payloadcms/ui/forms/useField'
1515
import { withCondition } from '@payloadcms/ui/forms/withCondition'
1616
import { useEditDepth } from '@payloadcms/ui/providers/EditDepth'
1717
import { useTranslation } from '@payloadcms/ui/providers/Translation'
18-
import isHotkey from 'is-hotkey'
18+
import { isHotkey } from 'is-hotkey'
1919
import React, { useCallback, useEffect, useMemo, useRef } from 'react'
2020
import { Node, Element as SlateElement, Text, Transforms, createEditor } from 'slate'
2121
import { withHistory } from 'slate-history'

pnpm-lock.yaml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)