1
0
mirror of synced 2025-02-04 14:19:23 +03:00

Merge pull request #736 from tamias/label_no_element

Avoid error when label has no matching element
This commit is contained in:
Igor Vaynberg 2013-01-23 11:13:31 -08:00
commit 17f9d78e26

View File

@ -529,7 +529,7 @@ the specific language governing permissions and limitations under the Apache Lic
attr = attr.replace(/([\[\].])/g,'\\$1'); /* escapes [, ], and . so properly selects the id */
target = $("#"+attr);
target = target.data("select2");
if (target !== undefined) { target.focus(); e.preventDefault();}
if (target !== undefined && target !== null) { target.focus(); e.preventDefault();}
}
});
});