Skip to content

Commit

Permalink
style(addons): remove null check
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Jul 6, 2021
1 parent e395fff commit e2d34ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function sourceDecorator(storyFn: StoryFn, context: StoryContext) {
const container = window.document.createElement('div');
render(story, container);
const source = applyTransformSource(container.innerHTML.replace(/<!---->/g, ''), context);
if (source) addons.getChannel().emit(SNIPPET_RENDERED, context?.id, source);
if (source) addons.getChannel().emit(SNIPPET_RENDERED, context.id, source);
}

return story;
Expand Down

0 comments on commit e2d34ea

Please sign in to comment.