Skip to content

Commit

Permalink
Fix getting Vue dom elements (#1610)
Browse files Browse the repository at this point in the history
* Fix getting Vue dom elements

* update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
  • Loading branch information
NoelDeMartin and RobinMalfait committed Jun 21, 2022
1 parent bc0b64a commit 90aa478
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/@headlessui-vue/CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `by` prop for `Listbox`, `Combobox` and `RadioGroup` ([#1482](https://github.com/tailwindlabs/headlessui/pull/1482))
- Add `@headlessui/tailwindcss` plugin ([#1487](https://github.com/tailwindlabs/headlessui/pull/1487))

### Fixed

- Fix getting Vue dom elements ([#1610](https://github.com/tailwindlabs/headlessui/pull/1610))

## [1.6.5] - 2022-06-20

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/@headlessui-vue/src/utils/dom.ts
Expand Up @@ -4,5 +4,5 @@ export function dom<T extends Element | ComponentPublicInstance>(ref?: Ref<T | n
if (ref == null) return null
if (ref.value == null) return null

return '$el' in ref.value ? (ref.value.$el as T | null) : ref.value
return (ref.value as { $el?: T }).$el ?? ref.value
}

0 comments on commit 90aa478

Please sign in to comment.