-
Notifications
You must be signed in to change notification settings - Fork 212
MWPW-185513 load federal query index only if federal links are present #5271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stage
Are you sure you want to change the base?
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
|
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
|
Closing this PR due to inactivity. |
| const config = getConfig(); | ||
| const queryIndexSuffix = window.location.host.includes(`${SLD}.page`) ? '-preview' : ''; | ||
|
|
||
| if (links.length && links.some((link) => link.includes('/federal/')) && !queryIndexes.federal) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: No need to check for length, some will return false if array is empty
| if (links.length && links.some((link) => link.includes('/federal/')) && !queryIndexes.federal) { | |
| if (links.some((link) => link.includes('/federal/')) && !queryIndexes.federal) { |
|
|
||
| if (links.length && links.some((link) => link.includes('/federal/')) && !queryIndexes.federal) { | ||
| queryIndexes.federal = processQueryIndexMap( | ||
| `${getFederatedContentRoot()}${prefix}/federal/assets/lingo/query-index${queryIndexSuffix}.json`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vhargrave Currently there are no lingo query indexes created for the /federal/ content. If needed, this might get setup for ACOM for the mid-year WWW Lingo release. Have you added this mostly to cater the eventual WWW use-case? Or do you see the need to set this up for the BACOM release?
Makes federal query index only load in if federal links are present
Resolves: MWPW-185513
Test URLs:
Federal query index always tried loading in (it's normal that it's 404ing right now)
Federal query index only loads in if there are actual federal links on the page
When there are Federal urls on the page though, then the query index still tries to load in like it did before.