Skip to content

Commit

Permalink
fix: build fix & prettier top level
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdoro committed Mar 5, 2024
1 parent 2f61dec commit a8d30fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/headless/src/components/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const EditorContent = forwardRef<HTMLDivElement, EditorContentProps>(
</EditorProvider>
</div>
);
}
},
);

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

startImageUpload(file, view, pos);
if (file) startImageUpload(file, view, pos);
return true;
}
return false;
Expand All @@ -90,7 +90,7 @@ export const defaultEditorProps: EditorProviderProps["editorProps"] = {
top: event.clientY,
});
// here we deduct 1 from the pos or else the image will create an extra node
startImageUpload(file, view, coordinates?.pos ?? 0 - 1);
if (file) startImageUpload(file, view, coordinates?.pos ?? 0 - 1);
return true;
}
return false;
Expand Down
1 change: 0 additions & 1 deletion apps/web/prettier.config.js → prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ module.exports = {
trailingComma: "all",
printWidth: 80,
tabWidth: 2,
plugins: [require("prettier-plugin-tailwindcss")],
};

0 comments on commit a8d30fc

Please sign in to comment.