Skip to content

Commit

Permalink
optional chaining is forbidden
Browse files Browse the repository at this point in the history
  • Loading branch information
ol0lll committed Apr 18, 2024
1 parent b8ecb2b commit f602463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/paragraphs-features.scroll-to-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Drupal.AjaxCommands.prototype.scrollToElement = function (ajax, response, status) {
var resizeObserver = new ResizeObserver(function () {
const elem = document.querySelector('[data-drupal-selector=' + response.drupalElementSelector + ']');
elem?.scrollIntoView({block: 'center'});
if (elem) {elem.scrollIntoView({block: 'center'});}
});

var parent = document.querySelector('[data-drupal-selector=' + response.drupalParentSelector + ']');
Expand Down

0 comments on commit f602463

Please sign in to comment.