Skip to content

Commit

Permalink
refactor(useMutationObserver): refactor remove duplicated conditional…
Browse files Browse the repository at this point in the history
… statements
  • Loading branch information
jdm1219 committed Mar 5, 2024
1 parent ae21dc1 commit 3e1779b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useMutationObserver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function useMutationObserver(
(targets) => {
cleanup()

if (isSupported.value && window && targets.size) {
if (isSupported.value && targets.size) {
observer = new MutationObserver(callback)
targets.forEach(el => observer!.observe(el, mutationOptions))
}
Expand Down

0 comments on commit 3e1779b

Please sign in to comment.