From 9d95086f0b82d47ac0f11237bbdee91daf66ec99 Mon Sep 17 00:00:00 2001 From: LilyMakesThings <127533508+LilyMakesThings@users.noreply.github.com> Date: Sat, 10 Feb 2024 20:15:22 +0000 Subject: [PATCH] Compare arrays properly Don't know which method is the most tasteful in this case so I just went with the one I already knew --- core/field_dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/field_dropdown.js b/core/field_dropdown.js index 95b69fe4be..54c53f07f3 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -164,7 +164,7 @@ Blockly.FieldDropdown.prototype.init = function() { */ Blockly.FieldDropdown.prototype.showEditor_ = function() { var options = this.getOptions(); - if (options.length == 0 || options == ['']) return; + if (options.length == 0 || JSON.stringify(options) === '[""]') return; this.dropDownOpen_ = true; // If there is an existing drop-down someone else owns, hide it immediately and clear it.