prismicio / javascript-kit

Development kit for the Javascript language
https://developers.prismic.io
106 stars 69 forks source link

parseFragment not properly initializing a StructuredText field retrieved with fetchLinks #137

Open levimykel opened 7 years ago

levimykel commented 7 years ago

When parsing the fragments of a document link, if the fetchLinks parameter was used on a StructuredText field, it does not properly initialize the field and will log something like the following in the console:

"Fragment type not supported: paragraph"

https://github.com/prismicio/javascript-kit/blob/master/lib/fragments.js#L1180

levimykel commented 7 years ago

It also means that getStructuredText, getText, or get don't work when trying to implement this into a template.