Skip to content

Commit 1bc6b81

Browse files
committed
Render components that returns null
1 parent 88bfbee commit 1bc6b81

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/extendReactClass.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default (Component: Object, defaultStyles: Object, options: Object) => {
4949
return linkClass(renderResult, styles, options);
5050
}
5151

52-
return React.createElement('noscript');
52+
return null;
5353
}
5454
};
5555

tests/extendReactClass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ describe('extendReactClass', () => {
128128
});
129129
});
130130
context('rendering Component that returns null', () => {
131-
it('generates <noscript> element', () => {
131+
it('generates null', () => {
132132
let Component;
133133

134134
const shallowRenderer = TestUtils.createRenderer();
@@ -145,7 +145,7 @@ describe('extendReactClass', () => {
145145

146146
const component = shallowRenderer.getRenderOutput();
147147

148-
expect(component.type).to.equal('noscript');
148+
expect(component).to.equal(null);
149149
});
150150
});
151151
context('target component have static properties', () => {

0 commit comments

Comments
 (0)