Ticket #4424 (closed defect: fixed)

Opened 15 months ago

Last modified 15 months ago

dojo.isObject: why true for null?

Reported by: peller Owned by: peller
Priority: normal Milestone: 1.0
Component: Core Version: 0.9
Severity: normal Keywords:
Cc:

Description

Maybe this is intentional, but I just tripped over it and there's a FIXME in the file.

Change History

Changed 15 months ago by peller

(In [10470]) missing null check. refs #4424, #3085

Changed 15 months ago by alex

hrm... typeof null == "object", and isObject should probably reflect that. This is a JavaScript?-ism and i'm not sure we should fix it since we rely on it in the widget system.

Changed 15 months ago by peller

  • status changed from new to assigned
  • owner changed from alex to peller

Cool. Then the fix is to remove the FIXME and document it.

Changed 15 months ago by peller

ok, forgive the ignorance, but why then is an extra it === null check required?

Changed 15 months ago by peller

  • status changed from assigned to closed
  • resolution set to fixed

(In [10475]) Add comments for isObject plus style mods. Fixes #4424, #3961

Note: See TracTickets for help on using tickets.