Closed
Bug 1139817
Opened 9 years ago
Closed 9 years ago
TypeError: imgs is undefined in TypeError: imgs is undefined
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(thunderbird38+ fixed)
RESOLVED
FIXED
Thunderbird 39.0
People
(Reporter: rkent, Assigned: rkent)
References
Details
Attachments
(1 file, 1 obsolete file)
1.71 KB,
patch
|
squib
:
review+
rkent
:
approval-comm-aurora+
|
Details | Diff | Splinter Review |
Regularly I get this error in the error console: Timestamp: 3/5/2015 1:59:59 AM Error: TypeError: imgs is undefined Source File: chrome://communicator/content/TypeError: imgs is undefined Line: 63
Assignee | ||
Comment 1•9 years ago
|
||
Also check for missing images.
Assignee: nobody → rkent
Status: NEW → ASSIGNED
Attachment #8573158 -
Flags: review?(squibblyflabbetydoo)
Comment 2•9 years ago
|
||
Comment on attachment 8573158 [details] [diff] [review] contentAreaClick.patch Review of attachment 8573158 [details] [diff] [review]: ----------------------------------------------------------------- r- but only because the existing code is really ugly, and we should take this opportunity to clean it up a bit. ::: mail/base/content/contentAreaClick.js @@ +58,5 @@ > { > // Scale any overflowing images, exclude http content. > let browser = getBrowser(); > let doc = browser && browser.contentDocument ? browser.contentDocument : null; > + let imgs = doc && !doc.URL.startsWith("http") && doc.images ? doc.images : []; I'd like this a lot better if it were something like the following. Note that I eliminated the null-check for getBrowser(), because if that returns null, something is seriously wrong, and I think we should log that error. Arguably, the same could be said for contentDocument too. let doc = getBrowser().contentDocument; if (!doc || doc.URL.startsWith("http") || !doc.images) return; for (let img of doc.images) { // ... }
Attachment #8573158 -
Flags: review?(squibblyflabbetydoo) → review-
Assignee | ||
Comment 3•9 years ago
|
||
If we're going to change it, let's also remove its indent.
Attachment #8573158 -
Attachment is obsolete: true
Attachment #8573534 -
Flags: review?(squibblyflabbetydoo)
Updated•9 years ago
|
Attachment #8573534 -
Flags: review?(squibblyflabbetydoo) → review+
Assignee | ||
Comment 4•9 years ago
|
||
https://hg.mozilla.org/comm-central/rev/33a9d905aa6e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
tracking-thunderbird38:
--- → +
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 39.0
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8573534 [details] [diff] [review] rewrite and de-indent https://hg.mozilla.org/releases/comm-aurora/rev/52eeb2c1202f
Attachment #8573534 -
Flags: approval-comm-aurora+
Assignee | ||
Updated•9 years ago
|
status-thunderbird38:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•