From 3d02717d535780032b210c58c265d3f74078dcba Mon Sep 17 00:00:00 2001 From: Alex Jover Date: Wed, 31 Aug 2022 17:58:22 +0200 Subject: [PATCH 1/2] refactor: add brackets to if Co-authored-by: Facundo Giuliani --- lib/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.ts b/lib/index.ts index 8d8a5d77..d335f3df 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -81,8 +81,9 @@ export const storyblokInit = (pluginOptions: SbSDKOptions = {}) => { // Rich Text resolver richTextResolver = new RichTextResolver(richText.schema); - if (richText.resolver) + if (richText.resolver) { setComponentResolver(richTextResolver, richText.resolver); + } return result; }; From 2470dd2cfb5e59717fb4bbe6a2f4adb427481618 Mon Sep 17 00:00:00 2001 From: Alex Jover Date: Wed, 31 Aug 2022 18:01:44 +0200 Subject: [PATCH 2/2] refactor: add brackets Co-authored-by: Facundo Giuliani --- lib/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/index.ts b/lib/index.ts index d335f3df..ea5c1075 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -125,7 +125,9 @@ export const renderRichText = ( let localResolver = richTextResolver; if (options) { localResolver = new RichTextResolver(options.schema); - if (options.resolver) setComponentResolver(localResolver, options.resolver); + if (options.resolver) { + setComponentResolver(localResolver, options.resolver); + } } return localResolver.render(data);