Skip to content

Commit

Permalink
Fix not found attribute styleInfoReader result (#6668)
Browse files Browse the repository at this point in the history
**Problem:**
StyleInfoReader returns `left('not found')` for attributes where there
is no relevant tailwind classes set.
But the features expect `right({ type: 'ATTRIBUTE_NOT_FOUND' })` result
in these cases.

**Manual Tests:**
I hereby swear that:

- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Play mode
  • Loading branch information
gbalint authored Nov 21, 2024
1 parent c42354c commit f68eaf0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ export function useGetMultiselectedProps<P extends ParsedPropertiesKeys>(
(props: JSXAttributes, prop: keyof StyleInfo): GetModifiableAttributeResult => {
const elementStyle = getActivePlugin(store.editor).readStyleFromElementProps(props, prop)
if (elementStyle == null) {
return left('not found')
return right({ type: 'ATTRIBUTE_NOT_FOUND' })
}
switch (elementStyle.type) {
case 'not-found':
Expand Down

0 comments on commit f68eaf0

Please sign in to comment.