mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-26 03:24:04 -08:00
fix(migrate): create properties when nil
This commit is contained in:
parent
f838eaf00a
commit
84e1e898f4
|
@ -28,6 +28,10 @@ func (segment *Segment) migrate(version int) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if segment.Properties == nil {
|
||||||
|
segment.Properties = properties.Map{}
|
||||||
|
}
|
||||||
|
|
||||||
// Cache settings, the default is now 24h so we have to respect this being disabled previously
|
// Cache settings, the default is now 24h so we have to respect this being disabled previously
|
||||||
if !segment.Properties.GetBool("cache_version", false) {
|
if !segment.Properties.GetBool("cache_version", false) {
|
||||||
segment.Properties[properties.CacheDuration] = cache.NONE
|
segment.Properties[properties.CacheDuration] = cache.NONE
|
||||||
|
|
Loading…
Reference in a new issue