Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EvalError: Refused to evaluate a string as JavaScript because this document requires 'Trusted Type' assignment #133

Open
nuanyang233 opened this issue May 31, 2023 · 0 comments

Comments

@nuanyang233
Copy link

nuanyang233 commented May 31, 2023

There is a new Function in spline-runtime, which caused an error in the csp environment.

new Function(
    'r',
    'return function(){return {' +
        r
            .map((s) => {
                return Vz.test(s) ? s + ':r()' : '[' + JSON.stringify(s) + ']:r()'
            })
            .join(',') +
        '}}'
)(on)

As I couldn't find the runtime repository, I'm unable to provide a PR to fix this issue.

Implemented a simple patch here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant