File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ func (l action) Attrs() map[template.HTMLAttr]any {
106106}
107107
108108func starAction (p Page ) []Command {
109+ if ! p .Exists () {
110+ return nil
111+ }
112+
109113 starred := isStarred (p )
110114 return []Command {action {starred : starred , page : p }}
111115}
Original file line number Diff line number Diff line change 1- {{- $commands := "" }}
2-
3- {{- if .page }}
4- {{- $commands = commands .page }}
5- {{- end }}
6-
7- {{- if $commands }}
1+ {{- with commands .page }}
82< div class ="modal " id ="commands-modal ">
93 < div class ="modal-background "> </ div >
104
1610 </ div >
1711 < aside class ="menu p-1 " style ="max-height: 30em; overflow-y: auto; ">
1812 < ul class ="menu-list ">
19- {{- range $commands -}}
13+ {{- range . -}}
2014 < li >
2115 < a {{ range $k, $v : = .Attrs }}{{$k}} ="{{$v}} " {{end}} class ="icon-text ">
2216 < span class ="icon "> < i class ="{{.Icon}} "> </ i > </ span >
You can’t perform that action at this time.
0 commit comments