Closed
Bug 1002291
Opened 11 years ago
Closed 11 years ago
[Camera] Setting.configure weak check if a variable is an array
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: dmarcos, Unassigned)
Details
Checking if the attribute length is defined is weak. We should be doing the following:
Object.prototype.toString.call(o) === '[object Array]'
Explanation here:
http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
Comment 1•11 years ago
|
||
Or `Array.isArray(o)`
I need a little bit more info on what line you're talking about. I believe the intention is to see if there are any options defined in the settings config.
Comment 2•11 years ago
|
||
That is, I don't think the length check is specifically to check that `options` is an Array. We're just making the assumption that it is.
Comment 3•11 years ago
|
||
Any progress on this issue? Is it even an issue?
Flags: needinfo?(wilsonpage)
Flags: needinfo?(dmarcos)
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(wilsonpage)
Resolution: --- → INVALID
| Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(dmarcos)
You need to log in
before you can comment on or make changes to this bug.
Description
•