Fixed improper handling of potentially empty string for strconv.Atoi()

This commit is contained in:
Seednode 2022-11-08 19:30:08 -06:00
parent ea2e17d265
commit a9b2af3e18
2 changed files with 4 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
var Version = "0.23.0" var Version = "0.23.1"
func init() { func init() {
rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(versionCmd)

View File

@ -192,6 +192,9 @@ func serveHtml(w http.ResponseWriter, r *http.Request, filePath, dimensions stri
w.Header().Add("Content-Type", "text/html") w.Header().Add("Content-Type", "text/html")
refreshInterval := r.URL.Query().Get("refresh") refreshInterval := r.URL.Query().Get("refresh")
if refreshInterval == "" {
refreshInterval = "0"
}
queryParams, err := generateQueryParams(filters, r.URL.Query().Get("sort"), refreshInterval) queryParams, err := generateQueryParams(filters, r.URL.Query().Get("sort"), refreshInterval)