fix incorrect field name in stroke hierarchy deserialisation

This commit is contained in:
sheaf 2021-04-30 17:48:19 +02:00
parent df9b9c1f66
commit a4bf83949a

View file

@ -715,7 +715,7 @@ decodeStrokeHierarchy uniqueSupply = do
groupContents <- JSON.Decoder.atKey "contents" ( decodeSequence $ decodeStrokeHierarchy uniqueSupply )
pure ( StrokeGroup { groupName, groupVisible, groupContents } )
"leaf" -> do
strokeLeaf <- JSON.Decoder.atKey "leaf" ( decodeStroke uniqueSupply )
strokeLeaf <- JSON.Decoder.atKey "stroke" ( decodeStroke uniqueSupply )
pure ( StrokeLeaf { strokeLeaf } )
_ -> throwError ( JSON.ParseFailed $ "Unsupported stroke hierarchy type with tag " <> tag )