Closed
Bug 959286
Opened 12 years ago
Closed 12 years ago
Defaulting track event values doesn't happen if object has a property set to undefined
Categories
(Webmaker Graveyard :: Popcorn Maker, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: thecount, Assigned: thecount)
Details
Attachments
(1 file)
Right now on staging YouTube clips being opened in the editor crashes.
We try to access contentType which is expected to be a string with the content type, or defaulted to "".
Actually though, it's undefined, and it misses the defaulting.
We check if something needs to be defaulted by doing "!popcornOptions.hasOwnProperty( prop )"
This is going to fail if at some point we did this:
options.contentType: getContentType() // returns undefined
so now even though options,contentType is not defined, there is a contentType property there, so it never gets defaulted.
We should instead be doing a double equal check against null. This way we don't default false, 0 and "", but we do default undefined, no prop and null.
Patch done, just need a bug number.
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → scott
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8359329 -
Flags: review?(schranz.m)
Comment 2•12 years ago
|
||
Comment on attachment 8359329 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/410
See comments.
Attachment #8359329 -
Flags: review?(schranz.m) → review-
| Assignee | ||
Comment 3•12 years ago
|
||
Comment on attachment 8359329 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/410
Updates.
Attachment #8359329 -
Flags: review- → review?(schranz.m)
| Assignee | ||
Comment 4•12 years ago
|
||
Also added line comments in the pull to explain the changes. Might not be obvious.
Updated•12 years ago
|
Attachment #8359329 -
Flags: review?(schranz.m) → review+
| Assignee | ||
Comment 5•12 years ago
|
||
Staged: https://github.com/mozilla/popcorn.webmaker.org/commit/ec9de2b2cd7ab19b4b3c52a33e93bcf86913e107
Needs verification.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(scott)
Resolution: --- → FIXED
| Assignee | ||
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
Flags: needinfo?(scott)
You need to log in
before you can comment on or make changes to this bug.
Description
•