reference to undefined property column.id in unifinder (strict js warning on Moz1.7/1.8 tree capatibility code)

RESOLVED FIXED

Status

Calendar
Sunbird Only
--
trivial
RESOLVED FIXED
14 years ago
12 years ago

People

(Reporter: gekacheka, Assigned: Mostafa Hosseini)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2

On moz1.7, with cvs cal, running with strict javascript produces warning: 
  reference to undefined property column.id
in several places in
  unifinder.js
  unifinderToDo.js

Problem is Moz1.7/Moz1.8 tree compatibility code that checks for column.id when
column is a string (in moz1.7).  Safer approach is to check the type of column
is an object before accessing id property.

Instead of 
   (column.id || column)
use
   (typeof(column)=="object" ? column.id : column)




Reproducible: Always
Steps to Reproduce:
(Reporter)

Comment 1

14 years ago
Created attachment 152800 [details] [diff] [review]
unifinder.js, unifinderToDo.js patch:  (col.id || col) --> (typeof(col)=="object"? col.id : col)
(Reporter)

Comment 2

14 years ago
Works on Moz1.7.1 and Moz1.8 (sunbird).
OS: Windows 2000 → All
Hardware: PC → All
(Assignee)

Comment 3

14 years ago
Checked in. Thanks
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
The bugspam monkeys have been set free and are feeding on Calendar :: Sunbird Only. Be afraid for your sanity!
QA Contact: gurganbl → sunbird
You need to log in before you can comment on or make changes to this bug.