From 1aeb6007509f3e4e4b3f22207f752f2c7b6b2446 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 22 May 2024 16:35:04 -0700 Subject: [PATCH] Set 'bestPath' to empty by default instead of nil Signed-off-by: Danila Fedorin --- layouts/partials/geturl.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/partials/geturl.html b/layouts/partials/geturl.html index 3a00321..393aa10 100644 --- a/layouts/partials/geturl.html +++ b/layouts/partials/geturl.html @@ -1,6 +1,7 @@ {{- $scratch := .scratch -}} {{- $scratch.Set "bestLength" -1 -}} {{- $scratch.Set "bestUrl" (printf "%s/code/%s" .siteSourceUrl .path) -}} +{{- $scratch.Set "bestPath" "" -}} {{- $filePath := .path -}} {{- range $path, $url := .submoduleLinks -}} {{- $bestLength := $scratch.Get "bestLength" -}}