Skip to content

Commit adab92e

Browse files
committed
styles use dom
1 parent 031cd79 commit adab92e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/widgets/peopleSearch.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ export const createPeopleSearch = function (
5050

5151
// Add responsive styles for people search
5252
const styleId = 'people-search-styles'
53-
if (!document.getElementById(styleId)) {
54-
const style = document.createElement('style')
53+
if (!dom.getElementById(styleId)) {
54+
const style = dom.createElement('style')
5555
style.id = styleId
5656
style.textContent = `
5757
.people-search-input {
@@ -72,7 +72,8 @@ export const createPeopleSearch = function (
7272
}
7373
}
7474
`
75-
document.head.appendChild(style)
75+
const styleContainer = dom.head || dom.documentElement || dom.body
76+
styleContainer?.appendChild(style)
7677
}
7778

7879
const searchForm = dom.createElement('form')

0 commit comments

Comments
 (0)