Don't use ts-ignore. It is hiding real errors
We are passing the wrong arguments to addVisualEditorHooks Bug: T297119 Change-Id: I2f8ced4513a1e5fcca2a2a2393cbb8fd7a3db388
This commit is contained in:
parent
d20e32f8d1
commit
d79dbf37c9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue