Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Store.SetInMap with nil map throws error #14958

@jmooring

Description

@jmooring

New in v0.162.0.

Reference: https://discourse.gohugo.io/t/error-while-building-theme-hugo-1-62/57212/

This code:

{{ .Store.Set "foo" dict }}
{{ .Store.SetInMap "foo" "answer" "42" }}

Throws this error:

error calling SetInMap: assignment to entry in nil map

New behavior introduced in #14924.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions