Skip to content
Browse files

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
  • Loading branch information...
1 parent 5a6b2c3 commit a77c00a16fe73cdd76b61f7b106e36dc667fbf9d @marcins marcins committed Aug 30, 2012
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;
}

0 comments on commit a77c00a

Please sign in to comment.
Something went wrong with that request. Please try again.