Project

General

Profile

Actions

Bug #93729

closed

Wrong check for undefined in DateTimePicker

Added by Nikita Hovratov about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
Start date:
2021-03-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

64      if (element.dataset.datepickerInitialized !== 'undefined') {
65        return;
66      }

Should be typeof check

Actions #1

Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68374

Actions #2

Updated by Tymoteusz Motylewski about 3 years ago

any hints how to reproduce it? CR seems easy, but would like to give "verified" vote too.

Actions #3

Updated by Nikita Hovratov about 3 years ago

Tymoteusz Motylewski wrote in #note-2:

any hints how to reproduce it? CR seems easy, but would like to give "verified" vote too.

I found this by upgrading my extension to v11. I don't know if you can find an error in TYPO3 itself.
But this is definetely wrong if you compare this with version 10.4, where the typeof check was still present:

    const $dateTimeFields = $(selector || this.fieldSelector).filter((index: number, element: HTMLElement): boolean => {
      return typeof $(element).data('DateTimePicker') === 'undefined';
    });
Actions #4

Updated by Nikita Hovratov about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF