Ticket #3165 (closed bug: fixed)
Invaild Comparsion in _changeDatePicker
| Reported by: | scottsloan@… | Owned by: | grabanski |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | ui.datepicker | Version: | 1.5.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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
Note: See
TracTickets for help on using
tickets.


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.