Skip to content

Commit

Permalink
Specified the context for getComputedStyle()
Browse files Browse the repository at this point in the history
  • Loading branch information
joelit committed Jan 23, 2025
1 parent 3b70d8f commit 7f289de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resource/js/truncate-search-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function truncateSearchResults () {
link.style.right = '0'
link.style.padding = '0'
link.textContent = '... (' + countResultValues(result) + ')'
const backgroundColor = getComputedStyle(result).backgroundColor
const backgroundColor = window.getComputedStyle(result).backgroundColor
link.style.backgroundColor = backgroundColor
link.onclick = () => showAllResults(result)
result.appendChild(link)
Expand Down

0 comments on commit 7f289de

Please sign in to comment.