Skip to content

Commit

Permalink
Compare arrays properly
Browse files Browse the repository at this point in the history
Don't know which method is the most tasteful in this case so I just went with the one I already knew
  • Loading branch information
LilyMakesThings authored Feb 10, 2024
1 parent e72d810 commit 9d95086
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/field_dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9d95086

Please sign in to comment.