Skip to content

Commit ce5ea61

Browse files
committed
Align integrity condition in boot.js with those of other html assets.
1 parent 0fb1a7b commit ce5ea61

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

assets/js/boot.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@
88

99
function addStyleSheet(res) {
1010
var link = document.createElement('link')
11-
link.crossOrigin = 'anonymous'
12-
link.integrity = res.integrity
11+
12+
if (res.integrity &&
13+
res.href.slice(0, 6) === 'https:') {
14+
link.crossOrigin = 'anonymous'
15+
link.integrity = res.integrity
16+
}
17+
1318
link.rel = 'stylesheet'
1419
link.href = res.href
1520
head.appendChild(link)

0 commit comments

Comments
 (0)