Skip to content

Commit

Permalink
Fix wrong decoding of property
Browse files Browse the repository at this point in the history
  • Loading branch information
justgook committed Jan 23, 2020
1 parent 4b80d69 commit 433b8bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "justgook/elm-tiled",
"summary": "A library for building decoders for Tiled levels.",
"license": "BSD-3-Clause",
"version": "3.0.0",
"version": "3.0.1",
"exposed-modules": [
"Tiled",
"Tiled.Level",
Expand Down
2 changes: 1 addition & 1 deletion src/Tiled/Properties.elm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ decodeProperty typeString =
Decode.map File Decode.string

"object" ->
Decode.map String Decode.string
Decode.map Object Decode.int

_ ->
Decode.fail <| "I can't decode the property type " ++ typeString
1 change: 1 addition & 0 deletions tests/Generate.elm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ property =
, Fuzz.map String Fuzz.string
, Fuzz.map Color Fuzz.string
, Fuzz.map File Fuzz.string
, Fuzz.map Tiled.Properties.Object Fuzz.int
]


Expand Down

0 comments on commit 433b8bd

Please sign in to comment.