Skip to content

Commit

Permalink
Added check for readText (for firefox)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorvusPrudens committed Sep 18, 2023
1 parent ae774b0 commit 0e1864c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/editors/ContextMenuUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export default class ContextMenuUI extends React.PureComponent<P, S> {
<div onContextMenu={async (e) => {
e.preventDefault();

const clipboardEmpty = !Boolean(await navigator.clipboard.readText());
let clipboardEmpty = true;
if (navigator.clipboard.readText)
clipboardEmpty = !Boolean(await navigator.clipboard.readText());
const selection = this.props.editor.state.selected;

let enableAddPres = false;
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default "0.3.3.1694731814331";
export default "0.3.4.1695076976602";

0 comments on commit 0e1864c

Please sign in to comment.