From 7af73c91c4f6736c2e71a08f5d1ccc751a55bf96 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 27 May 2014 15:33:26 +0000 Subject: [PATCH] Avoid infinite loop looking up accounts --- etemplate/js/et2_widget_selectAccount.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etemplate/js/et2_widget_selectAccount.js b/etemplate/js/et2_widget_selectAccount.js index 8ac16ba245..5b1f32040b 100644 --- a/etemplate/js/et2_widget_selectAccount.js +++ b/etemplate/js/et2_widget_selectAccount.js @@ -309,6 +309,10 @@ var et2_selectAccount = et2_selectbox.extend( for(var j = 0; j < search.length; j++) { var found = false; + + // Not having a value to look up causes an infinite loop + if(!search[j]) continue; + // Options are not indexed, so we must look for(var i = 0; !found && i < this.options.select_options.length; i++) {