Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
fbfad46818
2 changed files with 6 additions and 2 deletions
|
@ -58,7 +58,11 @@ func setBlockAttrs(c *gin.Context) {
|
|||
attrs := arg["attrs"].(map[string]interface{})
|
||||
nameValues := map[string]string{}
|
||||
for name, value := range attrs {
|
||||
nameValues[name] = value.(string)
|
||||
if nil == value { // API `setBlockAttrs` 中如果存在属性值设置为 `null` 时移除该属性 https://github.com/siyuan-note/siyuan/issues/5577
|
||||
nameValues[name] = ""
|
||||
} else {
|
||||
nameValues[name] = value.(string)
|
||||
}
|
||||
}
|
||||
err := model.SetBlockAttrs(id, nameValues)
|
||||
if nil != err {
|
||||
|
|
|
@ -53,7 +53,7 @@ func watchAssets() {
|
|||
}
|
||||
|
||||
go func() {
|
||||
logging.Recover()
|
||||
defer logging.Recover()
|
||||
|
||||
var (
|
||||
timer *time.Timer
|
||||
|
|
Loading…
Add table
Reference in a new issue