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

copy source when data is arraybuffer #1609

Closed
wants to merge 3 commits into from

Conversation

luocongqiu
Copy link

When I pass the Blob file and options params, the Document component will render twice, and the second time source.data will empty

image

@wojtekmaj
Copy link
Owner

Is there a chance you could add a test that was previously failing, and now isn't, so that we would be sure it doesn't regress?

@luocongqiu
Copy link
Author

@wojtekmaj codesandbox

@wojtekmaj
Copy link
Owner

Define options outside of React function as documentation says and the error is gone.

@wojtekmaj wojtekmaj closed this Sep 25, 2023
@luocongqiu
Copy link
Author

@wojtekmaj In my usage scenario, the options parameter cannot be static, such as password

@wojtekmaj
Copy link
Owner

Use useMemo.

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

Successfully merging this pull request may close these issues.

2 participants