Skip to content

Commit

Permalink
fix mistake from 18acad4
Browse files Browse the repository at this point in the history
Signed-off-by: Tim <[email protected]>
  • Loading branch information
Avarei committed Jul 4, 2024
1 parent 5ffc981 commit d0b1bc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkl/crossplane.contrib/crossplane.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ local function convert(value: Any, type: reflect.Type?): Any =
let (template = getResourceTemplate(value, customResourceTemplates)) // TODO: replace customResourceTemplate with actual val
value
.toMap()
.map((k, v) -> Pair(k, convert(v, reflect.Class(pkl.getClass()).properties.getOrNull(k)?.type)))
.toTyped(pkl.getClass())
.map((k, v) -> Pair(k, convert(v, reflect.Class(template.getClass()).properties.getOrNull(k)?.type)))
.toTyped(template.getClass())
else if (value is Mapping && referent is reflect.Class && referent.isSubclassOf(typedClass))
value
.toMap()
Expand Down

0 comments on commit d0b1bc8

Please sign in to comment.