Skip to content

Commit

Permalink
fix(useWindowFocus): revert example (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaaski committed Jul 5, 2021
1 parent 4209ef7 commit 72f5542
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/useWindowFocus/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const startMessage = '💡 Click somewhere outside of the document to unfocus.'
const message = ref(startMessage)
const focused = useWindowFocus()
watch(focused, (current) => {
if (current)
message.value = 'ℹ Tab is unfocused'
else
watch(focused, (isFocused) => {
if (isFocused)
message.value = startMessage
else
message.value = 'ℹ Tab is unfocused'
})
</script>

Expand Down

0 comments on commit 72f5542

Please sign in to comment.