Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Listview: add extra check to fix issue #4901 #4909

Merged
merged 1 commit into from

2 participants

@marcins

If a listview was nested inside a normal list then the listviewcreate
event for autodividers would also fire for the parent list causing an error
as this list did not contain listview data. An extra check is added to ensure
the list is actually a listview.

Fixes issue #4901

@marcins marcins Listview: add extra check to fix issue #4901
If a listview was nested inside a normal list then the listviewcreate
event for autodividers would also fire for the parent list causing an error
as this list did not contain listview data. An extra check is added to ensure
the list is actually a listview.

Fixes issue #4901
a77c00a
@jaspermdegroot jaspermdegroot merged commit fe035d0 into jquery:master
@jaspermdegroot
Collaborator

@marcins - Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 29, 2012
  1. @marcins

    Listview: add extra check to fix issue #4901

    marcins authored
    If a listview was nested inside a normal list then the listviewcreate
    event for autodividers would also fire for the parent list causing an error
    as this list did not contain listview data. An extra check is added to ensure
    the list is actually a listview.
    
    Fixes issue #4901
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  js/widgets/listview.autodividers.js
View
2  js/widgets/listview.autodividers.js
@@ -26,7 +26,7 @@ $( document ).delegate( "ul,ol", "listviewcreate", function() {
var list = $( this ),
listview = list.data( "listview" );
- if ( !listview.options.autodividers ) {
+ if ( !listview || !listview.options.autodividers ) {
return;
}
Something went wrong with that request. Please try again.