fix: move the setup dropdown to the callback because ot exists at that point (#19803)

This commit is contained in:
Ridhwana 2023-07-24 16:56:35 +02:00 committed by GitHub
parent 963eea8126
commit 03905ce9cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,6 +100,7 @@ if (!document.getElementById('featured-story-marker')) {
const callback = () => {
initializeDisplayAdVisibility();
observeDisplayAds();
setupDisplayAdDropdown();
};
renderFeed(feedTimeFrame, callback);
@ -121,6 +122,7 @@ if (!document.getElementById('featured-story-marker')) {
const callback = () => {
initializeDisplayAdVisibility();
observeDisplayAds();
setupDisplayAdDropdown();
};
renderFeed(changedFeedTimeFrame, callback);
@ -144,5 +146,4 @@ InstantClick.on('change', () => {
});
InstantClick.init();
setupDisplayAdDropdown();
trackCreateAccountClicks('sidebar-wrapper-left');