Skip to content

Commit

Permalink
Merge pull request #169 from radio4000/fix/route-channel
Browse files Browse the repository at this point in the history
Fix route channel
  • Loading branch information
oskarrough committed May 15, 2024
2 parents 20feadd + 6d138fd commit 4774364
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/base-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export default class BaseChannel extends R4Page {
super.connectedCallback()
}

willUpdate(changedProps) {
// If the slug changed, check we have the right channel.
if (changedProps.get('params')?.slug) this.setChannel()
}

get slug() {
return this.config.singleChannel ? this.config.selectedSlug : this.params.slug
}
Expand Down
1 change: 1 addition & 0 deletions src/pages/r4-page-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default class R4PageChannel extends BaseChannel {
`
}
}

renderChannelCard() {
return html` <r4-channel-card .channel=${this.channel} origin=${this.channelOrigin}></r4-channel-card> `
}
Expand Down

0 comments on commit 4774364

Please sign in to comment.