Skip to content

Commit 7830fe6

Browse files
committed
refactor: improve key existence check in stripMetaKeys function
1 parent c74f6c5 commit 7830fe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/inventory/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ func stripMetaKeys(tool ServerTool, keys []string) *ServerTool {
445445
// Check if any of the specified keys exist
446446
hasKeys := false
447447
for _, key := range keys {
448-
if tool.Tool.Meta[key] != nil {
448+
if _, ok := tool.Tool.Meta[key]; ok {
449449
hasKeys = true
450450
break
451451
}

0 commit comments

Comments
 (0)