Procházet zdrojové kódy

:art: 搜索支持命名查询 https://github.com/siyuan-note/siyuan/issues/6589

Liang Ding před 2 roky
rodič
revize
c90ca948c4
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      kernel/model/storage.go

+ 1 - 0
kernel/model/storage.go

@@ -113,6 +113,7 @@ func setCriteria(criteria []*Criterion) (err error) {
 }
 }
 
 
 func getCriteria() (ret []*Criterion, err error) {
 func getCriteria() (ret []*Criterion, err error) {
+	ret = []*Criterion{}
 	dataPath := filepath.Join(util.DataDir, "storage/criteria.json")
 	dataPath := filepath.Join(util.DataDir, "storage/criteria.json")
 	if !gulu.File.IsExist(dataPath) {
 	if !gulu.File.IsExist(dataPath) {
 		return
 		return