Skip to content

Commit dd78d50

Browse files
committed
chore: fix STRIPPED_INTEGRITY_TAG import warnings
1 parent a50ebdc commit dd78d50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/runner/injection/patches/setAttribute.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { STRIPPED_INTEGRITY_TAG } from '@packages/rewriter/lib/constants.json'
1+
import constants from '@packages/rewriter/lib/constants.json'
22

33
export const patchElementIntegrity = (window: Window) => {
44
const originalFormElementSetAttribute = window.HTMLScriptElement.prototype.setAttribute
55

66
window.HTMLScriptElement.prototype.setAttribute = function (qualifiedName, value) {
77
if (qualifiedName === 'integrity') {
8-
qualifiedName = STRIPPED_INTEGRITY_TAG
8+
qualifiedName = constants.STRIPPED_INTEGRITY_TAG
99
}
1010

1111
return originalFormElementSetAttribute.apply(this, [qualifiedName, value])
@@ -15,7 +15,7 @@ export const patchElementIntegrity = (window: Window) => {
1515

1616
window.HTMLLinkElement.prototype.setAttribute = function (qualifiedName, value) {
1717
if (qualifiedName === 'integrity') {
18-
qualifiedName = STRIPPED_INTEGRITY_TAG
18+
qualifiedName = constants.STRIPPED_INTEGRITY_TAG
1919
}
2020

2121
return originalAnchorElementSetAttribute.apply(this, [qualifiedName, value])

0 commit comments

Comments
 (0)