Skip to content
Snippets Groups Projects
Verified Commit 1c33460a authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3487449 by tom konda: Prefer to replace some of typeof obj !==...

Issue #3487449 by tom konda: Prefer to replace some of typeof obj !== 'undefined' with optional chaining
parent e116e045
Branches
Tags
14 merge requests!11197Issue #3506427 by eduardo morales alberti: Remove responsive_image.ajax from hook,!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!10786Issue #3490579 by shalini_jha, mstrelan: Add void return to all views...,!10210Issue #3487907: Drupal.displace() use getComputedStyle() for hidden chk.,!5423Draft: Resolve #3329907 "Test2",!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3478Issue #3337882: Deleted menus are not removed from content type config,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2062Issue #3246454: Add weekly granularity to views date sort,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation
Pipeline #344263 passed with warnings
Pipeline: drupal

#344295

    Pipeline: drupal

    #344286

      Pipeline: drupal

      #344281

        +4
        ......@@ -370,12 +370,7 @@ window.Drupal = { behaviors: {}, locale: {} };
        options.context = options.context || '';
        // Fetch the localized version of the string.
        if (
        typeof drupalTranslations !== 'undefined' &&
        drupalTranslations.strings &&
        drupalTranslations.strings[options.context] &&
        drupalTranslations.strings[options.context][str]
        ) {
        if (drupalTranslations?.strings?.[options.context]?.[str]) {
        str = drupalTranslations.strings[options.context][str];
        }
        ......@@ -518,10 +513,7 @@ window.Drupal = { behaviors: {}, locale: {} };
        let index = 0;
        // Determine the index of the plural form.
        if (
        typeof drupalTranslations !== 'undefined' &&
        drupalTranslations.pluralFormula
        ) {
        if (drupalTranslations?.pluralFormula) {
        index =
        count in drupalTranslations.pluralFormula
        ? drupalTranslations.pluralFormula[count]
        ......@@ -562,11 +554,7 @@ window.Drupal = { behaviors: {}, locale: {} };
        * @see https://www.drupal.org/core/deprecation#javascript
        */
        Drupal.deprecationError = ({ message }) => {
        if (
        drupalSettings.suppressDeprecationErrors === false &&
        typeof console !== 'undefined' &&
        console.warn
        ) {
        if (drupalSettings.suppressDeprecationErrors === false && console?.warn) {
        console.warn(`[Deprecation] ${message}`);
        }
        };
        ......
        ......@@ -78,10 +78,7 @@
        Drupal.behaviors.blockDrag = {
        attach(context, settings) {
        // tableDrag is required and we should be on the blocks admin page.
        if (
        typeof Drupal.tableDrag === 'undefined' ||
        typeof Drupal.tableDrag.blocks === 'undefined'
        ) {
        if (typeof Drupal?.tableDrag?.blocks === 'undefined') {
        return;
        }
        ......
        ......@@ -3,7 +3,7 @@
        * Support code for testing JavaScript error handling in functional tests.
        */
        (function () {
        if (typeof console !== 'undefined' && console.warn) {
        if (console?.warn) {
        const originalWarnFunction = console.warn;
        console.warn = (warning) => {
        const warnings = JSON.parse(
        ......
        ......@@ -1332,8 +1332,7 @@
        attach(context) {
        // Only act on the rearrange filter form.
        if (
        typeof Drupal.tableDrag === 'undefined' ||
        typeof Drupal.tableDrag['views-rearrange-filters'] === 'undefined'
        typeof Drupal?.tableDrag?.['views-rearrange-filters'] === 'undefined'
        ) {
        return;
        }
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment