Virtual whiteboard for sketching hand-drawn like diagrams
fix: prevent adding images to library via contextMenu (#4264)
David Luzar34a382ace93c
diff --git a/src/actions/actionAddToLibrary.ts b/src/actions/actionAddToLibrary.tsindex 57eacc0c9c..0df832b0e7 100644--- a/src/actions/actionAddToLibrary.ts+++ b/src/actions/actionAddToLibrary.ts@@ -8,6 +8,16 @@ import { t } from "../i18n";export const actionAddToLibrary = register({name: "addToLibrary",perform: (elements, appState, _, app) => {+ if (elements.some((element) => element.type === "image")) {+ return {+ commitToHistory: false,+ appState: {+ ...appState,+ errorMessage: "Support for adding images to the library coming soon!",+ },+ };+ }+return app.library.loadLibrary().then((items) => {