summaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-02-16 14:24:35 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-02-16 19:05:18 +0100
commit68f67c9aebfeb63aa12d69e86b1d652d6ce63ce0 (patch)
treea3231ec1e542c9f44d29fcb805bb9804ea5c0bb0 /resources
parent43ea2cd660a9052f45729e1a1d7dbc68c1d08440 (diff)
Fix rebuild regression on non-default content language edits
Fixes #12043
Diffstat (limited to 'resources')
-rw-r--r--resources/resource/resourcetypes.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/resources/resource/resourcetypes.go b/resources/resource/resourcetypes.go
index 43d0aa786..7a735dca5 100644
--- a/resources/resource/resourcetypes.go
+++ b/resources/resource/resourcetypes.go
@@ -17,6 +17,7 @@ import (
"context"
"github.com/gohugoio/hugo/common/maps"
+ "github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/langs"
"github.com/gohugoio/hugo/media"
@@ -250,7 +251,10 @@ func IsStaleAny(os ...any) bool {
// MarkStale will mark any of the oses as stale, if possible.
func MarkStale(os ...any) {
for _, o := range os {
- if s, ok := o.(Staler); ok {
+ if types.IsNil(o) {
+ continue
+ }
+ if s, ok := o.(StaleMarker); ok {
s.MarkStale()
}
}