Missing undefined listview var check on line 8878 #5643

Closed
andreatondo opened this Issue Feb 14, 2013 · 2 comments

2 participants

@andreatondo

At line 8878 of jqm 1.3.0-rc.1 it happened in certain circumstances to have listview variable undefined, and as there is no check, trying to access listview.options returns a JS error.

if ( !listview.options.filter ) {
should become
if ( !listview || !listview.options.filter ) {
as done in another case at line 6590

@jaspermdegroot
jQuery Foundation member

@andreatondo

Can you please provide a test page. See the contributing guidelines for instructions and our JS Bin template.

@jaspermdegroot
jQuery Foundation member

@andreatondo

The issue is already clear to me, so no need to provide a test page anymore (see #5696).
This JS Bin has custom script in the head that you can use until 1.3.1 to prevent issues: http://jsbin.com/ukewu3/321/edit
Thanks for reporting the issue!

@jaspermdegroot jaspermdegroot added a commit that referenced this issue Feb 25, 2013
@jaspermdegroot jaspermdegroot Listview filter: Check if var listview is defined. Fixes #5696 and #5643


The listviewcreate event bubbles up which causes an error if a listview is nested in an UL or OL without data-role="listview".
1e88b3b
@jaspermdegroot jaspermdegroot added a commit that referenced this issue Feb 25, 2013
@jaspermdegroot jaspermdegroot Listview filter: Check if var listview is defined. Fixes #5696 and #5643


The listviewcreate event bubbles up which causes an error if a listview is nested in an UL or OL without data-role="listview".
c92a2bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment