Skip to content

Commit 8cff741

Browse files
authored
Update src/block/text/util.js
1 parent 26cb873 commit 8cff741

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/block/text/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export const useOnPaste = clientId => {
1212
return useCallback( event => {
1313
event.preventDefault()
1414
// Get the raw HTML from the clipboard
15-
const html = event.clipboardData.getData( 'text/html' )
16-
const plain = event.clipboardData.getData( 'text/plain' )
15+
const html = event.clipboardData?.getData( 'text/html' ) || ''
16+
const plain = event.clipboardData?.getData( 'text/plain' ) || ''
1717

1818
const blocks = pasteHandler( {
1919
HTML: html,

0 commit comments

Comments
 (0)