Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Nov 15, 2023
1 parent 21c5b3e commit 8f55a57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/cmdk/components/CommandEmpty.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { onMount } from 'svelte';
import { derived } from 'svelte/store';
import { getState } from '../command.js';
import type { EmptyProps } from '../types.js';
Expand All @@ -16,15 +15,16 @@
});
const state = getState();
const render = derived(state, ($state) => $state.filtered.count === 0);
$: render = $state.filtered.count === 0;
const attrs = {
'data-cmdk-empty': '',
role: 'presentation'
};
</script>

{#if !isFirstRender && $render}
{#if !isFirstRender && render}
{#if asChild}
<slot {attrs} />
{:else}
Expand Down

0 comments on commit 8f55a57

Please sign in to comment.