Skip to content

pushing to state array overwriting previous value #482

@joe-p

Description

@joe-p
if (this.user2tasks(task.app.creator).exists) {
  this.user2tasks(task.app.creator).value.push(task.app);
} else {
  const newWhitelist: AppID[] = [task.app];
  this.user2tasks(task.app.creator).value = newWhitelist;
}

Reported by Ludo on discord

does not work somehow as when i try to add the second value to the list it replaces the first value

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    TODO

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions