File tree 1 file changed +3
-3
lines changed
packages/runner/injection/patches
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
- import { STRIPPED_INTEGRITY_TAG } from '@packages/rewriter/lib/constants.json'
1
+ import constants from '@packages/rewriter/lib/constants.json'
2
2
3
3
export const patchElementIntegrity = ( window : Window ) => {
4
4
const originalFormElementSetAttribute = window . HTMLScriptElement . prototype . setAttribute
5
5
6
6
window . HTMLScriptElement . prototype . setAttribute = function ( qualifiedName , value ) {
7
7
if ( qualifiedName === 'integrity' ) {
8
- qualifiedName = STRIPPED_INTEGRITY_TAG
8
+ qualifiedName = constants . STRIPPED_INTEGRITY_TAG
9
9
}
10
10
11
11
return originalFormElementSetAttribute . apply ( this , [ qualifiedName , value ] )
@@ -15,7 +15,7 @@ export const patchElementIntegrity = (window: Window) => {
15
15
16
16
window . HTMLLinkElement . prototype . setAttribute = function ( qualifiedName , value ) {
17
17
if ( qualifiedName === 'integrity' ) {
18
- qualifiedName = STRIPPED_INTEGRITY_TAG
18
+ qualifiedName = constants . STRIPPED_INTEGRITY_TAG
19
19
}
20
20
21
21
return originalAnchorElementSetAttribute . apply ( this , [ qualifiedName , value ] )
You can’t perform that action at this time.
0 commit comments