Opened 15 years ago

Closed 15 years ago

#3165 closed bug (fixed)

Invaild Comparsion in _changeDatePicker

Reported by: [email protected] 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)) {...}

Change History (1)

comment:1 Changed 15 years ago by kbwood

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.

Note: See TracTickets for help on using tickets.