Bug fixing

This commit is contained in:
Alexei Anoshenko 2025-08-06 16:02:39 +03:00
parent 5cb3841cf8
commit c4dfba2796
2 changed files with 8 additions and 6 deletions

View File

@ -106,12 +106,12 @@ func (app *application) ServeHTTP(w http.ResponseWriter, req *http.Request) {
} }
switch req.Method { switch req.Method {
case "POST": case http.MethodPost:
if req.URL.Path == "/" { if req.URL.Path == "/" {
app.postHandler(w, req) app.postHandler(w, req)
} }
case "GET": case http.MethodGet:
switch req.URL.Path { switch req.URL.Path {
case "/": case "/":
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)

View File

@ -67,7 +67,6 @@ func (listLayout *listLayoutData) init(session Session) {
listLayout.set = listLayout.setFunc listLayout.set = listLayout.setFunc
listLayout.remove = listLayout.removeFunc listLayout.remove = listLayout.removeFunc
listLayout.changed = listLayout.propertyChanged listLayout.changed = listLayout.propertyChanged
} }
func normalizeListLayoutTag(tag PropertyName) PropertyName { func normalizeListLayoutTag(tag PropertyName) PropertyName {
@ -115,9 +114,12 @@ func (listLayout *listLayoutData) removeFunc(tag PropertyName) []PropertyName {
return result return result
case Content: case Content:
listLayout.viewsContainerData.removeFunc(Content) result := listLayout.viewsContainerData.removeFunc(Content)
listLayout.adapter = nil if listLayout.adapter != nil {
return []PropertyName{Content} listLayout.adapter = nil
return []PropertyName{Content}
}
return result
} }
return listLayout.viewsContainerData.removeFunc(tag) return listLayout.viewsContainerData.removeFunc(tag)