diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 834913eb8..e0b49f550 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -16,6 +16,11 @@ [cols="1,10,3", options="header", width="100%"] |=== | | Description | PR + +| 🐛 +| Fixed panic in `kn channel list` +| https://github.com/knative/client/pull/1568[#1568] + | 🗑 | Remove deprecated Hugo frontmatter generation for docs | https://github.com/knative/client/pull/1563[#1563] diff --git a/pkg/kn/commands/channel/flags.go b/pkg/kn/commands/channel/flags.go index a9832782b..d5673ee60 100644 --- a/pkg/kn/commands/channel/flags.go +++ b/pkg/kn/commands/channel/flags.go @@ -56,7 +56,14 @@ func printChannel(channel *messagingv1.Channel, options hprinters.PrintOptions) } name := channel.Name - ctype := channel.Spec.ChannelTemplate.Kind + template := channel.Spec.ChannelTemplate + + var ctype string + if template == nil { + ctype = "" + } else { + ctype = template.Kind + } url := "" if channel.Status.Address != nil { url = channel.Status.Address.URL.String()