mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
[WIKI-412] regression: drop plugin logic #7161
This commit is contained in:
committed by
GitHub
parent
ef3ec7274c
commit
1113f9fc19
@@ -6,7 +6,7 @@ import { ACCEPTED_ATTACHMENT_MIME_TYPES, ACCEPTED_IMAGE_MIME_TYPES } from "@/con
|
||||
import { TEditorCommands, TExtensions } from "@/types";
|
||||
|
||||
type Props = {
|
||||
disabledExtensions: TExtensions[];
|
||||
disabledExtensions?: TExtensions[];
|
||||
editor: Editor;
|
||||
};
|
||||
|
||||
@@ -83,7 +83,7 @@ export const DropHandlerPlugin = (props: Props): Plugin => {
|
||||
};
|
||||
|
||||
type InsertFilesSafelyArgs = {
|
||||
disabledExtensions: TExtensions[];
|
||||
disabledExtensions?: TExtensions[];
|
||||
editor: Editor;
|
||||
event: "insert" | "drop";
|
||||
files: File[];
|
||||
@@ -111,7 +111,7 @@ export const insertFilesSafely = async (args: InsertFilesSafelyArgs) => {
|
||||
else if (ACCEPTED_ATTACHMENT_MIME_TYPES.includes(file.type)) fileType = "attachment";
|
||||
}
|
||||
// insert file depending on the type at the current position
|
||||
if (fileType === "image" && !disabledExtensions.includes("image")) {
|
||||
if (fileType === "image" && !disabledExtensions?.includes("image")) {
|
||||
editor.commands.insertImageComponent({
|
||||
file,
|
||||
pos,
|
||||
|
||||
Reference in New Issue
Block a user