0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-28 07:31:25 -05:00

🐛 Fix component context menu

This commit is contained in:
Pablo Alba 2023-08-21 09:15:25 +02:00 committed by Andrés Moya
parent c2a27bb845
commit 3de50986e7
2 changed files with 4 additions and 2 deletions

View file

@ -450,7 +450,8 @@
can-update-main? (or (not components-v2) touched?)
first-shape (first shapes)
{:keys [id component-id component-file main-instance?]} first-shape
{:keys [id component-id component-file]} first-shape
main-instance? (ctk/main-instance? first-shape)
component-shapes (filter #(contains? % :component-id) shapes)

View file

@ -7,6 +7,7 @@
(ns app.main.ui.workspace.sidebar.options.menus.component
(:require
[app.common.pages.helpers :as cph]
[app.common.types.component :as ctk]
[app.common.types.components-list :as ctkl]
[app.common.types.file :as ctf]
[app.main.data.modal :as modal]
@ -158,7 +159,7 @@
library-id (:component-file values)
show? (some? component-id)
main-instance? (if components-v2
(:main-instance values)
(ctk/main-instance? values)
true)
main-component? (:main-instance values)
lacks-annotation? (nil? (:annotation values))