Closed Bug 323057 Opened 19 years ago Closed 19 years ago

js strict warnings in calendar-month-view.xml and calendar-multiday-view.xml

Categories

(Calendar :: Sunbird Only, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ssitter, Assigned: ssitter)

Details

Attachments

(1 file, 1 obsolete file)

During startup of Sunbird I get the following javascript strict warnings:

  Warning: function set_selectedItem does not always return a value
  Source File: chrome://calendar/content/calendar-multiday-view.xml
  Line: 1952, Column: 7

  Warning: function get_selectedDay does not always return a value
  Source File: chrome://calendar/content/calendar-month-view.xml
  Line: 608, Column: 7

As I'm tired of that I'll send a patch.
Attached patch patch (obsolete) — — Splinter Review
Assignee: mostafah → ssitter
Status: NEW → ASSIGNED
Attachment #208210 - Flags: first-review?(jminta)
Comment on attachment 208210 [details] [diff] [review]
patch

               return (this.mSelectedItem = val);
+          } else {
+              return val;

Mozilla style guidelines say that when an 'if' returns, the superfluous 'else' should be omitted.
Attachment #208210 - Flags: first-review?(jminta) → first-review-
Attached patch patch, v2 — — Splinter Review
Changed the method to use only one return point, might also help to avoid confusion if that assignment was intended or not.
Attachment #208210 - Attachment is obsolete: true
Attachment #208301 - Flags: first-review?(jminta)
Comment on attachment 208301 [details] [diff] [review]
patch, v2

very nice. r=jminta
Attachment #208301 - Flags: first-review?(jminta) → first-review+
patch checked in
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060909 Calendar/0.3a2+
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: