Portrait reservation fix?
This commit is contained in:
@@ -1169,6 +1169,10 @@ func nativeDatasetSourceDir(dataset nativeDataset) string {
|
||||
}
|
||||
|
||||
func collectReferencedLockKeysFromValue(value any, referenced map[string]struct{}) {
|
||||
collectReferencedLockKeysFromValueWithExpansion(value, referenced, false)
|
||||
}
|
||||
|
||||
func collectReferencedLockKeysFromValueWithExpansion(value any, referenced map[string]struct{}, inExpansionSubtree bool) {
|
||||
switch typed := value.(type) {
|
||||
case string:
|
||||
if strings.Contains(typed, ":") {
|
||||
@@ -1176,17 +1180,26 @@ func collectReferencedLockKeysFromValue(value any, referenced map[string]struct{
|
||||
}
|
||||
case []any:
|
||||
for _, item := range typed {
|
||||
collectReferencedLockKeysFromValue(item, referenced)
|
||||
collectReferencedLockKeysFromValueWithExpansion(item, referenced, inExpansionSubtree)
|
||||
}
|
||||
case map[string]any:
|
||||
_, hasValue := typed["value"]
|
||||
_, hasData := typed["data"]
|
||||
isExpansion := hasValue && hasData
|
||||
|
||||
for key, item := range typed {
|
||||
if strings.Contains(key, ":") {
|
||||
referenced[key] = struct{}{}
|
||||
}
|
||||
if key == "key" {
|
||||
if inExpansionSubtree {
|
||||
if s, ok := item.(string); ok && strings.Contains(s, ":") {
|
||||
referenced[s] = struct{}{}
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
collectReferencedLockKeysFromValue(item, referenced)
|
||||
collectReferencedLockKeysFromValueWithExpansion(item, referenced, inExpansionSubtree || isExpansion)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user