From f6424f32611bce8d9e95c369c28e2f787e2cdf75 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Wed, 15 Dec 2021 15:19:04 -0800 Subject: [PATCH] Don't use ts-ignore. It is hiding real errors We are passing the wrong arguments to addVisualEditorHooks Bug: T297119 Change-Id: I2f8ced4513a1e5fcca2a2a2393cbb8fd7a3db388 (cherry picked from commit d79dbf37c9013a4e40f12cfa607f144908d10248) --- resources/skins.vector.es6/stickyHeader.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/resources/skins.vector.es6/stickyHeader.js b/resources/skins.vector.es6/stickyHeader.js index 944c69c8..9fee96b2 100644 --- a/resources/skins.vector.es6/stickyHeader.js +++ b/resources/skins.vector.es6/stickyHeader.js @@ -428,22 +428,19 @@ function isStickyHeaderAllowed() { * @param {IntersectionObserver} observer */ function initStickyHeader( observer ) { - if ( !isStickyHeaderAllowed() ) { + if ( !isStickyHeaderAllowed() || !header || !userMenu || !stickyIntersection ) { return; } makeStickyHeaderFunctional( - // @ts-ignore header, userMenu, userMenuStickyContainer, observer, stickyIntersection ); - // @ts-ignore setupSearchIfNeeded( header ); - // @ts-ignore - addVisualEditorHooks( header, stickyIntersection, observer ); + addVisualEditorHooks( stickyIntersection, observer ); // Make sure ULS outside sticky header disables the sticky header behaviour. // @ts-ignore