Skip to content

Commit

Permalink
chore: update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zouhangwithsweet committed Feb 28, 2024
1 parent a23c2fe commit 0c9c2fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoints/injected/components/Code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const CodeArea = memo((props: { minimized?: boolean }) => {
const handleSelectionChange = useCallback(async () => {
const node = figma.currentPage?.selection?.[0]
setCurrentSelection(node ?? null)
setName(node?.name ?? '')
setName((node.type === 'TEXT' ? node.characters : node?.name) ?? '')

const cssObj = await node?.getCSSAsync?.()
if (cssObj === undefined) return
Expand Down

0 comments on commit 0c9c2fc

Please sign in to comment.