Skip to content
This repository
Browse code

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 a77c00a16fe73cdd76b61f7b106e36dc667fbf9d 1 parent 5a6b2c3
Marcin Szczepanski authored August 30, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  js/widgets/listview.autodividers.js
2  js/widgets/listview.autodividers.js
@@ -26,7 +26,7 @@ $( document ).delegate( "ul,ol", "listviewcreate", function() {
26 26
 	var list = $( this ),
27 27
 			listview = list.data( "listview" );
28 28
 
29  
-	if ( !listview.options.autodividers ) {
  29
+	if ( !listview || !listview.options.autodividers ) {
30 30
 		return;
31 31
 	}
32 32
 

0 notes on commit a77c00a

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