Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit d669a2224c0f27bf44e601983ce999c604d3d47d 1 parent 337e9e0
@marcins marcins authored committed
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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.