Skip to content

Commit e2e51ca

Browse files
authored
fix full blog post issue (#343)
1 parent 8247bc2 commit e2e51ca

5 files changed

Lines changed: 17 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [2.4.4] - 2025-02-05
6+
7+
### Fixed
8+
9+
- Fixed full blog post bug [(issue #341)](https://github.com/nmelhado/league-page/issues/341)
10+
511
## [2.4.3] - 2025-02-01
612

713
### Fixed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "league-page",
3-
"version": "2.4.3",
3+
"version": "2.4.4",
44
"homepage": "https://github.com/nmelhado/league-page",
55
"repository": {
66
"type": "git",

src/lib/BlogPosts/FullPost.svelte

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import LinearProgress from '@smui/linear-progress';
3-
import { generateParagraph } from "$lib/utils/helper";
3+
import { generateParagraph, waitForAll } from "$lib/utils/helper";
44
import { onMount } from "svelte";
55
import Comments from "./Comments.svelte";
66
import AuthorAndDate from './AuthorAndDate.svelte';
@@ -15,9 +15,12 @@
1515
1616
let loadingComments = true;
1717
let total, comments;
18+
let leagueTeamManagersDataLoaded, postsDataLoaded;
1819
1920
onMount(async()=> {
20-
const post = postsData.posts.filter(p => p.sys.id === postID)[0];
21+
[leagueTeamManagersDataLoaded, postsDataLoaded] = await waitForAll(leagueTeamManagersData,
22+
postsData);
23+
const post = postsDataLoaded.posts.filter(p => p.sys.id === postID)[0];
2124
id = post.sys.id;
2225
2326
if(post != null) {
@@ -211,12 +214,12 @@
211214

212215
<hr class="divider" />
213216

214-
<AuthorAndDate {type} leagueTeamManagers={leagueTeamManagersData} {author} {createdAt} />
217+
<AuthorAndDate {type} leagueTeamManagers={leagueTeamManagersDataLoaded} {author} {createdAt} />
215218

216219
<!-- display comments -->
217220
{#if !loadingComments}
218221
<hr class="divider commentDivider" />
219-
<Comments leagueTeamManagers={leagueTeamManagersData} {comments} {total} postID={id} />
222+
<Comments leagueTeamManagers={leagueTeamManagersDataLoaded} {comments} {total} postID={id} />
220223
{/if}
221224

222225
</div>

src/lib/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ available for your copy of League Page
55
*/
66

77
// Keep in sync with package.json
8-
export const version = "2.4.3";
8+
export const version = "2.4.4";

0 commit comments

Comments
 (0)