Skip to content

Commit 8728fa9

Browse files
Fix transferProps function not to transfer staticContext prop (#81)
1 parent 7cdbe19 commit 8728fa9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/lib/utils/__tests__/transferProps.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe('transferProps', () => {
3030
children: 'value',
3131
className: 'value',
3232
forwardedRef: 'value',
33+
staticContext: 'value',
3334
};
3435
const blacklistedProps = null;
3536
const expectedProps = {};

src/lib/utils/transferProps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const ALWAYS_BLACKLISTED_PROPS = ['children', 'className', 'forwardedRef'];
1+
const ALWAYS_BLACKLISTED_PROPS = ['children', 'className', 'forwardedRef', 'staticContext'];
22

33
export default (props, blacklistedProps) => {
44
const propsToTransfer = { ...props };

0 commit comments

Comments
 (0)