Browse Source

:bug: Fix npe

Liang Ding 3 years ago
parent
commit
d3eb23c137
1 changed files with 3 additions and 0 deletions
  1. 3 0
      kernel/api/filetree.go

+ 3 - 0
kernel/api/filetree.go

@@ -200,6 +200,9 @@ func getFullHPathByID(c *gin.Context) {
 	if !ok {
 		return
 	}
+	if nil == arg["id"] {
+		return
+	}
 
 	id := arg["id"].(string)
 	hPath, err := model.GetFullHPathByID(id)