Closed
Bug 1056015
Opened 10 years ago
Closed 7 years ago
Useless typeof test in ical.js
Categories
(Firefox OS Graveyard :: Gaia::Calendar, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: max, Assigned: kgrandon)
Details
Attachments
(1 file)
On line 179 (https://github.com/mozilla-b2g/gaia/blob/master/apps/calendar/js/ext/ical.js#L179) we have
return o && (o instanceof Array || typeof o == "array");
However, typeof never returns "array". For arrays, in particular, it returns "object", so the disjunct is useless.
Comment 1•10 years ago
|
||
Good catch. Array.isArray https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray is a good replacement.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
Seems this is fixed in the latest external ical.js library. Assigning this to myself for now and will see what the tests do.
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Comment 4•7 years ago
|
||
Firefox OS is not being worked on
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•