Skip to content

Commit

Permalink
add if statement test
Browse files Browse the repository at this point in the history
  • Loading branch information
baseballyama committed May 29, 2023
1 parent 298f539 commit c1c2c7b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- message: Do not call hasContext except during component initialization.
line: 5
column: 9
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script>
import { hasContext, onMount } from "svelte"
onMount(() => {
if (hasContext("answer")) {
console.log("The answer exist")
}
})
</script>

0 comments on commit c1c2c7b

Please sign in to comment.