Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5ebeb37

Browse files
alan-agius4dgp1130
authored andcommitted
refactor(@angular/ssr): mark LINK_LOAD_SCRIPT_CONTENT as @PURE
This const is pure. (cherry picked from commit f7c0a83)
1 parent df36a86 commit 5ebeb37

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎packages/angular/ssr/src/utils/inline-critical-css.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ const CSP_MEDIA_ATTR = 'ngCspMedia';
3232
* - Removes the event listener when all relevant `<link>` tags have been processed.
3333
* - Uses event capturing (the `true` parameter) since load events do not bubble up the DOM.
3434
*/
35-
const LINK_LOAD_SCRIPT_CONTENT = `
36-
(() => {
35+
const LINK_LOAD_SCRIPT_CONTENT = /* @__PURE__ */ (() => `(() => {
3736
const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';
3837
const documentElement = document.documentElement;
3938
@@ -57,7 +56,7 @@ const LINK_LOAD_SCRIPT_CONTENT = `
5756
};
5857
5958
documentElement.addEventListener('load', listener, true);
60-
})();`;
59+
})();`)();
6160

6261
/** Partial representation of an `HTMLElement`. */
6362
interface PartialHTMLElement {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /