From 62ac6edcf42d0b736a4363aad0593dc70832ace2 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Mon, 7 Jul 2014 16:54:54 +0200 Subject: webui: fix selection of empty value in a select widget Little regression - select widget could not handle empty or no array as an input value. It broke 'undo' operation in Permissions' 'Type' attribute while switching between '' and some value. Reviewed-By: Endi Sukma Dewata --- install/ui/src/freeipa/widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install/ui/src/freeipa') diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index c0c580062..79f814552 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -1981,7 +1981,7 @@ IPA.select_widget = function(spec) { that.update = function(values) { var old = that.save()[0]; - var value = values[0]; + var value = values[0] || ""; var option = $('option[value="'+value+'"]', that.select); if (option.length) { option.prop('selected', true); -- cgit