Skip to content

API setBlockAttrs 中如果存在属性值设置为 null 时移除该属性 #5577

Closed
@88250

Description

@88250

@88250 刚刚又发现了一个问题, 当 /api/attr/setBlockAttrs API 中如果存在属性值设置为 null 时, 不会更新任何属性, 且响应体中 code 也为 0

希望对其进行兼容处理, 属性值设置为 null"" 等效

Originally posted by @Zuoqiu-Yingyi in #4885 (comment)

等效即移除该属性。

Activity

self-assigned this
on Aug 5, 2022
added this to the 2.1.6 milestone on Aug 5, 2022
changed the title [-]API `setBlockAttrs` 中如果存在属性值设置为 `null` 时默认使用 `""`[/-] [+]API `setBlockAttrs` 中如果存在属性值设置为 `null` 时移除该属性[/+] on Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250

      Issue actions

        API `setBlockAttrs` 中如果存在属性值设置为 `null` 时移除该属性 · Issue #5577 · siyuan-note/siyuan