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

Issue #3502664 by tom konda: Some of comparison with Node.nodeType uses magic number

parent c131a1e8
No related branches found
No related tags found
3 merge requests!11197Issue #3506427 by eduardo morales alberti: Remove responsive_image.ajax from hook,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!617Issue #3043725: Provide a Entity Handler for user cancelation
Pipeline #409080 passed with warnings
Pipeline: drupal

#409081

    ...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
    function getDimensions(elem) { function getDimensions(elem) {
    const raw = elem[0]; const raw = elem[0];
    if (raw.nodeType === 9) { if (raw.nodeType === Node.DOCUMENT_NODE) {
    return { return {
    width: elem.width(), width: elem.width(),
    height: elem.height(), height: elem.height(),
    ...@@ -351,7 +351,8 @@ ...@@ -351,7 +351,8 @@
    const withinElement = $(element || window); const withinElement = $(element || window);
    const isWindow = const isWindow =
    !!withinElement[0] && withinElement[0] === withinElement[0].window; !!withinElement[0] && withinElement[0] === withinElement[0].window;
    const isDocument = !!withinElement[0] && withinElement[0].nodeType === 9; const isDocument =
    !!withinElement[0] && withinElement[0].nodeType === Node.DOCUMENT_NODE;
    const hasOffset = !isWindow && !isDocument; const hasOffset = !isWindow && !isDocument;
    return { return {
    element: withinElement, element: withinElement,
    ......
    ...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
    for (let i = from[mode]; i; i = i[mode]) { for (let i = from[mode]; i; i = i[mode]) {
    const $i = $(i); const $i = $(i);
    // Make sure that we're only dealing with elements. // Make sure that we're only dealing with elements.
    if (i.nodeType !== 1) { if (i.nodeType !== Node.ELEMENT_NODE) {
    continue; continue;
    } }
    // Either add or remove the selected class based on the state of the // Either add or remove the selected class based on the state of the
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment