From 16c868934d24d52b244c77093e300171db3be1f7 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 14 Jun 2012 09:39:23 -0700 Subject: [PATCH] minor cosmetic cleanup --- select2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/select2.js b/select2.js index 5db1190d..008a643e 100755 --- a/select2.js +++ b/select2.js @@ -268,15 +268,15 @@ * the text. */ function local(options) { - var data = options, // data elements, - dataText = '', + var data = options, // data elements + dataText, text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search if (!$.isArray(data)) { text = data.text; // if text is not a function we assume it to be a key name if (!$.isFunction(text)) { - dataText = data.text; // we need to store this in a seperate variable because in the next step data gets reset and data.text is no longer available + dataText = data.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available text = function (item) { return item[dataText]; }; } data = data.results;