Commit 3c9dfa5
authored
This PR fixes a Content Security Policy (CSP) violation for those who are using CSP headers and do not have script-src of unsafe-eval enabled.
The way the code is written now, onHover is undefined in this call to setTimeout. Passing undefined to setTimeout triggers a CSP violation for 'unsafe-eval' because setTimeout thinks you are passing a string, which is not allowed.
The CSP Violation: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ...
This PR moves the usage of onHover to after the function is defined, so that setTimeout is not called with undefined and there are no CSP violations.
1 parent a040098 commit 3c9dfa5
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
| |||
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments