Skip to content

Commit 4acc428

Browse files
committed
Making parentWindow optional
1 parent 96cdfb6 commit 4acc428

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/components/TextInput/TextInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import { isUserSelectingTag } from "./TagList/TagList";
66

77
export type TextInputProps = {
88
onSubmit?: (plainText: string, html: string) => void;
9-
parentWindow: Window;
9+
parentWindow?: Window;
1010
};
1111

1212
let editor: Editor | null = null;
1313

1414
export const TextInput = (props: TextInputProps) => {
1515
const { onSubmit, parentWindow } = props;
1616
editor = useEditor({
17-
extensions: getExtensions(parentWindow),
17+
extensions: getExtensions(parentWindow ?? window),
1818
editorProps: {
1919
attributes: {
2020
"aria-label": "Add a spark",

0 commit comments

Comments
 (0)