Skip to content

Can't update set from null to empty #383

@jakobrosenberg

Description

@jakobrosenberg

If a set is undefined, it's not possible to assign an empty set.

Doesn't work. my_set is still null after the update.

triplit.http.update('my_table', row => {
  // row.my_set is null
  row.my_set= new Set()
}

Works. my_set is an empty set after the update.

triplit.http.update('my_table', row => {
  // row.my_set is null
  row.my_field = new Set()
  section.my_set.add('__TRIGGER__')
  section.my_set.delete('__TRIGGER__')
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions