From 61d3c3b480bd6cb26b73f7d50775600552dbddae Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Thu, 8 Apr 2021 19:06:41 -0700 Subject: [PATCH] nomad/structs: fix diff --- nomad/structs/diff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)