Skip to content

Commit a09d65f

Browse files
authored
Restore original Clone() type conversion behavvior. (#66)
1 parent 2ad32b7 commit a09d65f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1414

1515
### Fixed
1616

17+
## [0.2.9]
18+
19+
### Changed
20+
21+
- Fix breaking change to mapstr type conversions during Clone(). #66
22+
1723
## [0.2.8]
1824

1925
### Changed

mapstr/mapstr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (m M) Clone() M {
155155
result := make(M, len(m))
156156

157157
for k := range m {
158-
if innerMap, ok := (m[k]).(M); ok {
158+
if innerMap, ok := tryToMapStr(m[k]); ok {
159159
result[k] = innerMap.Clone()
160160
} else {
161161
result[k] = m[k]

0 commit comments

Comments
 (0)