Skip to content

Commit 0f86c73

Browse files
committed
Fixed preserving single select value when going back and forward
1 parent dc4ab30 commit 0f86c73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

jquery.pjax.js

+1
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ function cloneContents(container) {
564564
findAll(container, "select").each(function(i, elem){
565565
elem = $(elem);
566566
var values = $(elem).val();
567+
values = $.isArray(values) ? values : [values];
567568
elem.find('option[selected]').attr('selected', false);
568569
elem.find('option').filter(function(){
569570
return ($.inArray(this.value, values) !== -1);

0 commit comments

Comments
 (0)