diff --git a/godot/nim/godotnim.nim b/godot/nim/godotnim.nim index e46055b..b8dd95c 100644 --- a/godot/nim/godotnim.nim +++ b/godot/nim/godotnim.nim @@ -483,8 +483,7 @@ proc godotVariantType*(T: typedesc[Table|TableRef]): VariantType {.inline.} = VariantType.Dictionary proc toGodot*[T: Table or TableRef](t: T): Variant = - var dict: Dictionary - initDictionary(dict) + let dict = initDictionary() mixin toGodot for k, v in t.pairs(): dict[toGodot(k)] = toGodot(v)