Homestyx hydra
Diffusion hydra 31ee49b14d93

Fix Javascript busy loop when trying to delete tokens from an empty tokenizer

Description

Fix Javascript busy loop when trying to delete tokens from an empty tokenizer

Summary:
Fixes T13147. In D19437, I changed this logic to support deleting the "" (empty string) token, but [].pop() returns undefined, not null, if the list is empty and I didn't think to try deleting an empty input.

Fix the logic so we don't end up in a loop if the input is empty.

Test Plan:

  • In any browser, deleted all tokens in a tokenizer; then pressed delete again.
  • Before: tab hangs in an infinte loop.
  • After: smooth sailing.

Reviewers: amckinley, avivey

Reviewed By: avivey

Maniphest Tasks: T13147

Differential Revision: https://secure.phabricator.com/D19456

Details

Provenance
epriestleyAuthored on Jun 1 2018, 4:05 PM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:2f6784ee1c41: Add workflow to create repository identities
Branches
Unknown
Tags
Unknown

Event Timeline