Skip to content

Commit 3e00607

Browse files
committed
fix: return type normalization
1 parent 19a7eb1 commit 3e00607

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

leetcode/question.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ func (m *MetaData) normalize() {
184184
if m.Return != nil {
185185
m.Return.Type = normalizeType(m.Return.Type)
186186
}
187-
for _, method := range m.Methods {
188-
for i, param := range method.Params {
189-
method.Params[i].Type = normalizeType(param.Type)
187+
for i, method := range m.Methods {
188+
for j, param := range method.Params {
189+
m.Methods[i].Params[j].Type = normalizeType(param.Type)
190190
}
191-
method.Return.Type = normalizeType(method.Return.Type)
191+
m.Methods[i].Return.Type = normalizeType(method.Return.Type)
192192
}
193193
}
194194

0 commit comments

Comments
 (0)