Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 8bd59a5

Browse files
realitykingpetebacondarwin
authored andcommitted
refactor(ngCsp): use document.head
The `head` property is available from IE9 onwards. Closes #11905
1 parent 9a1349d commit 8bd59a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/grunt/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ module.exports = {
116116
.replace(/\\/g, '\\\\')
117117
.replace(/'/g, "\\'")
118118
.replace(/\r?\n/g, '\\n');
119-
js = "!window.angular.$$csp() && window.angular.element(document).find('head').prepend('<style type=\"text/css\">" + css + "</style>');";
119+
js = "!window.angular.$$csp() && window.angular.element(document.head).prepend('<style type=\"text/css\">" + css + "</style>');";
120120
state.js.push(js);
121121

122122
return state;

0 commit comments

Comments
 (0)