title: Svelte Check if slot is empty while there's a fallback
body: <p>My component defines a slot with a fallback, that means if the parent does not pass a content in for that specific slot, the fallback is rendered.
  In addition, if the parent set an empty content for this slot, the slot is not display.</p>
  <p>Suppose I want to render some other content whether the slot has been set as empty.</p>
  <p>The doc says if the slot explicitly passes in an empty named slot will add that slot's name to $$slots properties. (which is contradictory with this part from the tutorial though : <a href="https://svelte.dev/tutorial/optional-slots" rel="nofollow noreferrer">https://svelte.dev/tutorial/optional-slots</a>).</p>
  <pre class="lang-js prettyprint-override"><code>// MyComp.svelte
  &lt;div class=&quot;component&quot;&gt;
     &lt;slot name=&quot;foo&quot;&gt;
      &lt;div class=&quot;fallback-content&quot;/&gt;
     &lt;/slot&gt;
    {#if $$slots.foo}
      &lt;div class=&quot;other-content&quot;&gt;Bar&lt;/div&gt;
    {/if}
  &lt;/div&gt;
  </code></pre>
  <pre><code>&lt;MyComp&gt;
     &lt;div slot=&quot;foo&quot;/&gt; // I don't want &quot;.other-content&quot; to be displayed
  &lt;/MyComp&gt;
  </code></pre>
  <p>How can I know when a slot has been explicity define as empty in the parent?</p>