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)

ARM
Gonk (Firefox OS)
defect
Not set
normal

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/
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.
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.
Any progress on this issue? Is it even an issue?
Flags: needinfo?(wilsonpage)
Flags: needinfo?(dmarcos)
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(wilsonpage)
Resolution: --- → INVALID
Flags: needinfo?(dmarcos)
You need to log in before you can comment on or make changes to this bug.