mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 02:12:42 -04:00
flatten converted values *after* recursive conversion, not instead of
This commit is contained in:
parent
fa5c66907d
commit
5b09d44944
@ -146,11 +146,6 @@ private[oc] object Registry extends api.detail.DriverAPI {
|
||||
memo += arg -> null
|
||||
null
|
||||
}
|
||||
else if (converted.size == 1 && converted.containsKey("oc:flatten")) {
|
||||
val value = converted.get("oc:flatten")
|
||||
memo += arg -> value // Update memoization map.
|
||||
value
|
||||
}
|
||||
else {
|
||||
// This is a little nasty but necessary because we need to keep the
|
||||
// 'converted' value up-to-date for any reference created to it in
|
||||
@ -163,7 +158,14 @@ private[oc] object Registry extends api.detail.DriverAPI {
|
||||
memo += converted -> converted // Makes convertMap re-use the map.
|
||||
convertRecursively(converted, memo, force = true)
|
||||
memo -= converted
|
||||
converted
|
||||
if (converted.size == 1 && converted.containsKey("oc:flatten")) {
|
||||
val value = converted.get("oc:flatten")
|
||||
memo += arg -> value // Update memoization map.
|
||||
value
|
||||
}
|
||||
else {
|
||||
converted
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user