Merge pull request #763 from SumitBando/patch-1

Broken tutorial : Svelte load function needs to await for data to load
This commit is contained in:
Luke B. Silver
2024-04-03 10:55:03 +01:00
committed by GitHub

View File

@@ -16,7 +16,7 @@ import { getIdeas } from '$lib/ideas';
export async function load() {
return {
ideas: getIdeas()
ideas: await getIdeas()
};
}
```
@@ -118,4 +118,4 @@ Simple as that! Now, let's create the page itself. Replace the contents in `src/
</style>
```
With this you have successfully created an Ideas Tracker! You can now submit ideas and view them.
With this you have successfully created an Ideas Tracker! You can now submit ideas and view them.