mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(common): typo in NgOptimizedImage warning (#56756)
A space is missing in the warning message for `TOO_MANY_PRIORITY_ATTRIBUTES`. PR Close #56756
This commit is contained in:
parent
ceaaa9815b
commit
f25653e231
1 changed files with 2 additions and 2 deletions
|
|
@ -1270,13 +1270,13 @@ function assertNoLoaderParamsWithoutLoader(dir: NgOptimizedImage, imageLoader: I
|
|||
*/
|
||||
function assetPriorityCountBelowThreshold() {
|
||||
if (IMGS_WITH_PRIORITY_ATTR_COUNT === 0) {
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
if (IMGS_WITH_PRIORITY_ATTR_COUNT > PRIORITY_COUNT_THRESHOLD) {
|
||||
console.warn(
|
||||
formatRuntimeError(
|
||||
RuntimeErrorCode.TOO_MANY_PRIORITY_ATTRIBUTES,
|
||||
`NgOptimizedImage: The "priority" attribute is set to true more than ${PRIORITY_COUNT_THRESHOLD} times (${IMGS_WITH_PRIORITY_ATTR_COUNT} times). ` +
|
||||
`Marking too many images as "high" priority can hurt your application's LCP (https://web.dev/lcp).` +
|
||||
`Marking too many images as "high" priority can hurt your application's LCP (https://web.dev/lcp). ` +
|
||||
`"Priority" should only be set on the image expected to be the page's LCP element.`,
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue