Documentation location/URL

web/core/modules/big_pipe/js/big_pipe.js

Problem/Motivation

TypeError: Cannot read properties of null (reading 'nodeType')

this is in code
/**
* Checks if node is valid big pipe replacement.
*/
function checkMutation(node) {
return Boolean(
node.nodeType === Node.ELEMENT_NODE &&
node.nodeName === 'SCRIPT' &&
node.dataset &&
node.dataset.bigPipeReplacementForPlaceholderWithId &&
typeof drupalSettings.bigPipePlaceholderIds[
node.dataset.bigPipeReplacementForPlaceholderWithId
] !== 'undefined',
);
}

Proposed resolution

/**
* Checks if node is valid big pipe replacement fix.
*/
function checkMutation(node) {
return Boolean(
node &&
node.nodeType === Node.ELEMENT_NODE &&
node.nodeName === 'SCRIPT' &&
node.dataset &&
node.dataset.bigPipeReplacementForPlaceholderWithId &&
typeof drupalSettings.bigPipePlaceholderIds[
node.dataset.bigPipeReplacementForPlaceholderWithId
] !== 'undefined'
);
}

Remaining tasks

only need to change this to fix the error in js

Comments

tsohar created an issue. See original summary.

avpaderno’s picture

Assigned: tsohar » Unassigned
Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Fixed
Issue tags: -drupal 10 big_pipe.js error

This issue queue is for reporting changes that should be done on documentation guides, not to report bugs or issues on sites running on Drupal.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.