diff --git a/src/component/preview.ts b/src/component/preview.ts index 3d111bb20..4c14efe27 100644 --- a/src/component/preview.ts +++ b/src/component/preview.ts @@ -73,7 +73,20 @@ function hideHighlightArea( window.onload = () => { SmoothscrollPolyfill.polyfill(); - renderReact(store, highlightElement); + const analyzer = store.getStyleguide().getAnalyzer(); + + if (!analyzer) { + return; + } + + switch (analyzer.getPatternType()) { + case 'react': + renderReact(store, highlightElement); + break; + + default: + console.log('No matching rederer found'); + } }; // Disable drag and drop from outside the application