Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Missing undefined listview var check on line 8878 #5643

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

Missing undefined listview var check on line 8878 #5643

andreatondo opened this issue Feb 14, 2013 · 2 comments

Comments

@andreatondo
Copy link

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
Copy link
Contributor

@andreatondo

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

@jaspermdegroot
Copy link
Contributor

@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 added a commit that referenced this issue Feb 25, 2013


The listviewcreate event bubbles up which causes an error if a listview is nested in an UL or OL without data-role="listview".
jaspermdegroot added a commit that referenced this issue Feb 25, 2013


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