plugin-samples
plugin-samples copied to clipboard
Fixed code.js
Ensure figma.loadAllPagesAsync() is supported
This API is not officially documented, and if it doesn’t exist, it will throw an error. You might want to check if it exists before calling it. figma.ui.postMessage should not use { origin: "*" }
The second argument for figma.ui.postMessage is unnecessary, as it only accepts a single argument in Figma Plugins. Ensure change.style is defined before accessing .name
You are using change.style?.name, but in some cases, change.style may be undefined. You should check it explicitly.