Open lm101845 opened 1 year ago
I cloned your code and run,I found that if I added this code I seemed could fix the problem:
the file location is js-visualizer-9000-client/src/components/ShareButton.js 84row
I cloned your code and run,I found that if I added this code I seemed could fix the problem:
the file location is js-visualizer-9000-client/src/components/ShareButton.js 84row
url.searchParams.set('code', btoa(encodeURIComponent(code)));
It's working
When I copy the code to the page, the website is clean and the console displays the following error message:
"react-dom.production.min.js:2857 Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range."
I searched from the internet,The reason seems to be this:
This error indicates that a string that does not conform to the Latin1 character set range was passed while using the btoa function. The Latin1 character set (also known as ISO-8859-1) contains most commonly used Latin letters and numbers, but excludes Chinese characters and some other common non-Latin characters.
To solve this problem, you need to transcode the strings so that they conform to the range of the Latin1 character set. This can be done using JavaScript's encodeURIComponent function, for example:
could you please fix this problem?thank you very much!
Your website(https://www.jsv9000.app/) is very good!