Skip to content

Commit

Permalink
Addon-contexts: Fix 'cannot read property h of undefined' in pr… (#9001)
Browse files Browse the repository at this point in the history
Addon-contexts: Fix 'cannot read property h of undefined' in preact
  • Loading branch information
shilman committed Nov 30, 2019
1 parent 6c27b63 commit 994d011
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/contexts/src/preview/frameworks/preact.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Preact from 'preact';
import { h, VNode } from 'preact';
import { createAddonDecorator, Render } from '../../index';
import { ContextsPreviewAPI } from '../ContextsPreviewAPI';

/**
* This is the framework specific bindings for Preact.
* '@storybook/preact' expects the returning object from a decorator to be a 'Preact vNode'.
*/
export const renderPreact: Render<Preact.VNode> = (contextNodes, propsMap, getStoryVNode) => {
export const renderPreact: Render<VNode> = (contextNodes, propsMap, getStoryVNode) => {
const { getRendererFrom } = ContextsPreviewAPI();
return getRendererFrom(Preact.h)(contextNodes, propsMap, getStoryVNode);
return getRendererFrom(h)(contextNodes, propsMap, getStoryVNode);
};

export const withContexts = createAddonDecorator(renderPreact);

1 comment on commit 994d011

@vercel
Copy link

@vercel vercel bot commented on 994d011 Nov 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

ENOENT: no such file or directory, stat '/tmp/Ojv0tPGaDQlFVg7SBDJNWsvb/repo/examples/official-storybook/built-storybooks/angular-cli'

Please sign in to comment.