From ffe6dd35e5b55f0238569a06997a7d693f51ab35 Mon Sep 17 00:00:00 2001 From: Kevin Miller Date: Fri, 8 Feb 2019 09:09:42 -0800 Subject: [PATCH] Catch for other source of content types --- src/rich-text-to-jsx.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rich-text-to-jsx.js b/src/rich-text-to-jsx.js index 3f3276a..d3c9961 100644 --- a/src/rich-text-to-jsx.js +++ b/src/rich-text-to-jsx.js @@ -139,7 +139,10 @@ export function entryNodeToJsx(node, options, key) { const { data, content, nodeType } = node; const { overrides, createElement } = options; - const contentType = get(data, 'target.contentType'); + let contentType = get(data, 'target.contentType'); + if(!contentType) { + contentType = get(data, 'target.sys.contentType.sys.id'); + } if (!contentType) { return unknownNodeToJsx(node, options, key);