View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001498 | AJAX/JS | Bug Report - Interface | public | 2009-04-12 03:25 | 2009-10-18 09:34 |
Reporter | twpol | Assigned To | fahrenheit | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0001498: [IE] anime.js: changeWatchedState(): fails with "'null' is null or not an object" because indexOf is enumerated | ||||
Description | http://static.anidb.net/js/anime3/anime.js, line 998 enumerates an array (file.epRelations) and puts all the keys into eids. In IE, because Array.prototype.indexOf is added by other JS code and isn't native, this sets eids["indexOf"] = 1 as well. Then, the loop below (line 999) goes through all the keys in eids and breaks on the "indexOf" item (unsurprisingly). Suggestion: replace this for (var eid in file.epRelations) eids[eid] = 1; with this for (var eid in file.epRelations) if (typeof file.epRelations[eid] != "function") eids[eid] = 1; | ||||
Additional Information | Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; WWTClient2) | ||||
Tags | No tags attached. | ||||
|
thanks for the report, if you notice more stuff like that do warn, the lack of indexOf is a major pain.. |
|
Many appologies, the fix I suggested was wrong. This code: for (var eid in file.epRelations) { if (typeof file.epRelations[eid] != "function") eids[eid] = 1; } Can be put back to the original: for (var eid in file.epRelations) eids[eid] = 1; And after theses lines: for (var eid in eids) { if (!eids[eid]) continue; var episode = episodes[eid]; var row = document.getElementById('e'+eid+'f'+file.id); Add this line to check we've got a real episode: if (!episode || !row) continue; Sorry. :( |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-04-12 03:25 | twpol | New Issue | |
2009-04-13 01:24 | DerIdiot | Status | new => assigned |
2009-04-13 01:24 | DerIdiot | Assigned To | => fahrenheit |
2009-04-16 21:44 | fahrenheit | Note Added: 0002704 | |
2009-04-16 21:44 | fahrenheit | Status | assigned => resolved |
2009-04-16 21:44 | fahrenheit | Resolution | open => fixed |
2009-10-02 01:46 | twpol | Note Added: 0003003 | |
2009-10-02 01:46 | twpol | Status | resolved => feedback |
2009-10-02 01:46 | twpol | Resolution | fixed => reopened |
2009-10-02 15:00 | DerIdiot | Project | HTML & PERL => AJAX/JS |
2009-10-18 09:34 | fahrenheit | Status | feedback => resolved |
2009-10-18 09:34 | fahrenheit | Resolution | reopened => fixed |