The team I work with ran into an issue where certain textfields would not export, and AEUX would hang. This was due to the property "openTypeFeatures" on TextNodes occasionally containing a Symbol reference which can't be unwrapped to be sent as data using figma.ui.postMessage method. I added a sanitizeValue utility function that you can put any value into and get back values that postMessage can use without error. This utility function is used in the nodeToObj function on the object that getElement returns.
sanitizeValue runs recursively on and value passed in that is an object or array. It will also return all supported values as is, and will return a string representation of functions, symbols, and regexes. All other values return null.
The team I work with ran into an issue where certain textfields would not export, and AEUX would hang. This was due to the property "openTypeFeatures" on TextNodes occasionally containing a Symbol reference which can't be unwrapped to be sent as data using figma.ui.postMessage method. I added a sanitizeValue utility function that you can put any value into and get back values that postMessage can use without error. This utility function is used in the nodeToObj function on the object that getElement returns.
sanitizeValue runs recursively on and value passed in that is an object or array. It will also return all supported values as is, and will return a string representation of functions, symbols, and regexes. All other values return null.