Avoid replacing an option that has been labeled while waiting for the response by checking to see if it is unchanged first.

This commit is contained in:
Nathan Gray 2015-12-14 18:28:29 +00:00
parent 8686238878
commit 5b65b12b1e

View File

@ -288,7 +288,7 @@ var et2_selectAccount = et2_selectbox.extend(
for(var i = 0; i < this.widget.options.select_options.length; i++)
{
var opt = this.widget.options.select_options[i];
if(opt && opt.value && opt.value == this.unknown)
if(opt && opt.value && opt.value == this.unknown && opt.label == this.unknown)
{
opt.label = name;
this.widget.set_select_options(this.widget.options.select_options);