Sfoglia il codice sorgente

add urbit status init to broadcast boostrap

reid 2 anni fa
parent
commit
ef87886386
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      broadcast/broadcast.go

+ 3 - 0
broadcast/broadcast.go

@@ -143,6 +143,9 @@ func recursiveUpdate(dst, src reflect.Value) error {
             if err := recursiveUpdate(dstVal, srcVal); err != nil {
                 return err
             }
+			if dst.IsNil() {
+				dst.Set(reflect.MakeMap(dst.Type()))
+			}
             dst.SetMapIndex(key, dstVal)
         }
         return nil