Fix for Javascript Strict Warning in calendarManagement.js

RESOLVED FIXED

Status

Calendar
Sunbird Only
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Stefan Sitter, Assigned: Mostafa Hosseini)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b5) Gecko/20051021 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051022 Mozilla Sunbird/0.2+

During startup I get a Javascript Strict Warning for every calendar:
  Warning: reference to undefined property rule.selectorText
  Source File: chrome://calendar/content/calendarManagement.js
  Line: 310

Reason is that first css rule does not have property selectorText:
  getRuleForObject: 
  object name = moz-profile-calendar://?id=2
  cssRules[0] = [object CSSImportRule]  selectorText = undefined
  cssRules[1] = [object CSSStyleRule]   selectorText = #calendar-deck
  cssRules[2] = [object CSSStyleRule]   selectorText = #calendar-controls-box
  [...]

Patch follows.

Reproducible: Always

Steps to Reproduce:
n.a.
(Reporter)

Comment 1

12 years ago
Created attachment 200461 [details] [diff] [review]
check for rule.selectorText
Attachment #200461 - Flags: first-review?(jminta)

Comment 2

12 years ago
Comment on attachment 200461 [details] [diff] [review]
check for rule.selectorText

r=jminta

Have you asked gerv for canconfirm/editbugs  permissions yet?  If not, you
should.
http://www.gerv.net/hacking/before-you-mail-gerv.html

Also, consider hopping on to #calendar in irc.mozilla.org, a lot of the
developers like to hang out there.
Attachment #200461 - Flags: first-review?(jminta) → first-review+

Comment 3

12 years ago
Thanks for the patch! :-) Checked in.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.