diff --git a/nomad/structs/diff.go b/nomad/structs/diff.go index 6964c009a..544af3e63 100644 --- a/nomad/structs/diff.go +++ b/nomad/structs/diff.go @@ -1647,7 +1647,7 @@ func volumeCSIMountOptionsDiff(oldMO, newMO *CSIMountOptions, contextual bool) * oldMO = &CSIMountOptions{} diff.Type = DiffTypeAdded newPrimitiveFlat = flatmap.Flatten(newMO, nil, true) - } else if oldMO == nil && newMO != nil { + } else if oldMO != nil && newMO == nil { newMO = &CSIMountOptions{} diff.Type = DiffTypeDeleted oldPrimitiveFlat = flatmap.Flatten(oldMO, nil, true)