Skip to content

Commit

Permalink
Fix when using 3 or fewer widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed Dec 5, 2023
1 parent 4b48f17 commit 6faeb63
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module zgo.at/goatcounter/v2

go 1.19
go 1.21

require (
code.soquee.net/otp v0.0.4
Expand Down
2 changes: 1 addition & 1 deletion i18n/fr-FR.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ Il s'agit du <strong>site en cours</strong> et cela va supprimer <strong>toutes
Les correspondances ne dépendent pas de la casse (majuscule/minuscule)<br>
* Accepte <code>%</code> comme joker => <code>/page%.html</code> renvoie tout ce qui commence par <code>/page</code> et se termine par <code>.html</code>.<br>
* <code>_</code> correspond à n'importe quel caractère => <code>_.html</code> renverra <code>a.html</code> et <code>b.html</code>.<br>
Utilisez <code>\\\%</code> et <code>\\\_</code> pour indiquer la présence d'un % ou d'un _.
Utilisez <code>\\%</code> et <code>\\_</code> pour indiquer la présence d'un % ou d'un _.
"""

["p/rm-pageview-match"]
Expand Down
2 changes: 1 addition & 1 deletion widgets/widgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (l List) Get(name string) List {
func (l List) InitialAndLazy() (initial List, lazy List) {
first := true
initial = make(List, 0, 3)
lazy = make(List, 0, len(l)-3)
lazy = make(List, 0, max(len(l), len(l)-3))
for _, w := range l {
switch w.Name() {
case "totalcount":
Expand Down

0 comments on commit 6faeb63

Please sign in to comment.