sveltefire
sveltefire copied to clipboard
TypeError: stop is not a function
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:

Can you provide a minimal example of your code? The code in that ss is actually compiled by svelte itself.
<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>
I have the same issue Did you find a solution for this?
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>