plugin-docs
plugin-docs copied to clipboard
Fix TypeError in network request tutorial sample code
CLA
- [x] I have signed the Adobe CLA (required).
Topic
This is a pull request for:
- [x] A tutorial contained within this repo.
- [ ] A sample contained within this repo.
- [ ] Something new that I have already discussed with Adobe in a GitHub issue. Issue link:
Versions
- [ ] XD version(s) tested : 27
- [ ] Tested XD version(s): 27
Description of the pull request
The sample code in Step 5 of the tutorial throws a TypeError: Cannot read property 'binary' of undefined when attempting to execute the applyImage command. This PR updates the parameters in the tutorial per the linked source code:
await tempFile.write(photoObj, { format: uxp.storage.formats.binary });
I think this might help explain the happy coincidence scenario over in https://forums.adobexdplatform.com/t/uxp-is-not-defined/1575/4 as well?