Fix unused plugins not being able to be dragged into the preview

This commit is contained in:
Andrew Kingston 2022-10-14 19:39:38 +01:00
parent fecb8bb1a6
commit dabc93e1b6
1 changed files with 3 additions and 3 deletions

View File

@ -21,13 +21,13 @@ const createDndStore = () => {
} }
const startDraggingNewComponent = ({ component, definition }) => { const startDraggingNewComponent = ({ component, definition }) => {
if (!component || !definition) { if (!component) {
return return
} }
// Get size of new component so we can show a properly sized placeholder // Get size of new component so we can show a properly sized placeholder
const width = definition.size?.width || 128 const width = definition?.size?.width || 128
const height = definition.size?.height || 64 const height = definition?.size?.height || 64
store.set({ store.set({
...initialState, ...initialState,