-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
JS Client: Fixes cannot read properties of null (reading 'is_file') #5035
Conversation
…s_file doesn't exist on d. Therefore invoking d.is_file will error out. This commit fixes that by failing quietly if the is_file property doesn't exist on d.
fixed spacing
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
Hi @raymondtri thanks for the contribution. Can you give a quick code example of where you're seeing this issue? |
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-5035-all-demos You can install the changes in this PR by running: pip install https://gradio-builds.s3.amazonaws.com/0e97ff844776dd6a99d0f31aeffb775bf0564583/gradio-3.39.0-py3-none-any.whl |
Hi @raymondtri just to follow up, can you share an example of what issue this PR is fixing? |
Will go ahead and merge this in. Though would still be good to know what triggered this error! |
Description
In transform_output, typeof d can be an object even if the property is_file doesn't exist on d. Therefore attempting to access d.is_file will error out. This commit fixes that by failing quietly if the is_file property doesn't exist on d.
Closes: (no issue, the fix is very small)
🎯 PRs Should Target Issues
The fix is very small.