vnphanquang / svelte-put

Useful svelte stuff to put in your projects

Home Page:https://svelte-put.vnphanquang.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@svelte-put/lockscroll: show error when use:lockscroll opn svelte:document

lynhan318 opened this issue · comments

Hi, Thanks for the awesome svelte project.

I follow the instructions here to implement lockscroll actions but face with the issue below:

This is my implement:

<script lang="ts">
  import {lockscroll, createLockScrollStore} from '@svelte-put/lockscroll';
  const locked = createLockScrollStore();
  $: {
    locked.set(!!visibleNode);
  }
</script>

<svelte:document use:lockscroll={locked} />

image

The error throw from:
image

It works fine on <svelte:body/>

Hey there @lynhan318 thank you very much for the report. The issue is fixed in the latest release @svelte-put/lockscroll@1.0.1 just now (through this commit). Please feel free to reopen if you are still having the same issue.

Cheers!