From 6648fc4bf1b4a7c8b158ef5e9d5e2bf85f054282 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 5 Jul 2022 19:58:21 -0700 Subject: [PATCH] dropdown_list_widget: Simplify ternary expression. Signed-off-by: Anders Kaseorg --- static/js/dropdown_list_widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/dropdown_list_widget.js b/static/js/dropdown_list_widget.js index d7ad5b0248..362d51e023 100644 --- a/static/js/dropdown_list_widget.js +++ b/static/js/dropdown_list_widget.js @@ -368,7 +368,7 @@ export class MultiSelectDropdownListWidget extends DropdownListWidget { return; } - const original_items = this.checked_items ? this.checked_items : this.initial_value; + const original_items = this.checked_items ?? this.initial_value; const items_added = _.difference(this.data_selected, original_items); // Removing the unnecessary items from dropdown.