Skip to content

Commit

Permalink
fix type assertion on source map version (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin authored Aug 30, 2022
1 parent ca1fb5d commit aa22fdf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion logic/source_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ func DecodeSourceMap(ism map[string]interface{}) (SourceMap, error) {
sm := SourceMap{}

if v, ok := ism["version"]; ok {
sm.Version = int(v.(float64))
switch t := v.(type) {
case float64:
sm.Version = int(t)
case uint64:
sm.Version = int(t)
}
}

if sm.Version != 3 {
Expand Down

0 comments on commit aa22fdf

Please sign in to comment.