Skip to content

Commit a8d30fc

Browse files
committed
fix: build fix & prettier top level
1 parent 2f61dec commit a8d30fc

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/headless/src/components/editor.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const EditorContent = forwardRef<HTMLDivElement, EditorContentProps>(
5353
</EditorProvider>
5454
</div>
5555
);
56-
}
56+
},
5757
);
5858

5959
EditorContent.displayName = "EditorContent";
@@ -76,7 +76,7 @@ export const defaultEditorProps: EditorProviderProps["editorProps"] = {
7676
const [file] = Array.from(event.clipboardData.files);
7777
const pos = view.state.selection.from;
7878

79-
startImageUpload(file, view, pos);
79+
if (file) startImageUpload(file, view, pos);
8080
return true;
8181
}
8282
return false;
@@ -90,7 +90,7 @@ export const defaultEditorProps: EditorProviderProps["editorProps"] = {
9090
top: event.clientY,
9191
});
9292
// here we deduct 1 from the pos or else the image will create an extra node
93-
startImageUpload(file, view, coordinates?.pos ?? 0 - 1);
93+
if (file) startImageUpload(file, view, coordinates?.pos ?? 0 - 1);
9494
return true;
9595
}
9696
return false;

apps/web/prettier.config.js prettier.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ module.exports = {
44
trailingComma: "all",
55
printWidth: 80,
66
tabWidth: 2,
7-
plugins: [require("prettier-plugin-tailwindcss")],
87
};

0 commit comments

Comments
 (0)