Skip to main content

Search and Top Navigation

#3165 closed bug (fixed)

Opened August 03, 2008 11:04PM UTC

Closed August 08, 2008 05:33PM UTC

Invaild Comparsion in _changeDatePicker

Reported by: scottsloan@gmail.com Owned by: grabanski
Priority: minor Milestone:
Component: ui.datepicker Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:
Description

You are doing an assignment operation within an if statement, which will always be true

if (inst = $.data(target, PROP_NAME)) {...}

I think you wanted the comparison operator.

Should be:

if (inst == $.data(target, PROP_NAME)) {...} or

if (inst === $.data(target, PROP_NAME)) {...}

Attachments (0)
Change History (1)

Changed August 08, 2008 05:33PM UTC by kbwood comment:1

resolution: → fixed
status: newclosed

The code was correct - it assigned the data values to inst and them confirmed that it was not null. However, it was unnecessarily confusing and inconsistent with the remainder of the code. Changed to conform and clarify the intent.