sveltefire icon indicating copy to clipboard operation
sveltefire copied to clipboard

TypeError: stop is not a function

Open zakaria-chahboun opened this issue 5 years ago • 4 comments

When I'm using "StorageRef" inside "Collection" everything is run good BUT Once i change the "Collection" path i get this issue in console TypeError: stop is not a function

pointing on this line of your code:

image

zakaria-chahboun avatar Mar 13 '20 19:03 zakaria-chahboun

Can you provide a minimal example of your code? The code in that ss is actually compiled by svelte itself.

codediodeio avatar Mar 13 '20 19:03 codediodeio

  <FirebaseApp {firebase}>
    <tbody>
      <Collection path="{question_root}/{lang}" let:data={questions} let:ref>
        {#each questions as q, i}
          <tr>
          <td>
         ........
          </td>

         <td>
           <StorageRef path={q.image} let:downloadURL >
              <figure class="image is-128x128">
                <img src={downloadURL} alt="" style="max-height:128px" />
              </figure>
           <StorageRef/>
          </td>
          .........

        </tr>



zakaria-chahboun avatar Mar 13 '20 20:03 zakaria-chahboun

I have the same issue Did you find a solution for this?

xylys avatar Mar 31 '20 15:03 xylys

I have the same issue Did you find a solution for this?

I Fix it by working natively like this:

<script>
  import { firebase } from "./firebase.js"; // my firebase configuration
  let upload = firebase.storage().ref();
</script>

<FirebaseApp {firebase}>
    <Collection path="path .." let:data={questions} let:ref>
      {#each questions as q, i}
         <div>
           {#await upload.child(q.imageQuestion).getDownloadURL()}
                      Loading ..
           {:then url}
                 <img src={url} alt="" />
           {/await}
        </div>
    {/each}
   <Collection>
</FirebaseApp>

zakaria-chahboun avatar Apr 02 '20 17:04 zakaria-chahboun