Skip to content

Commit

Permalink
Merge pull request #474 from kevva/remove-required-i18n
Browse files Browse the repository at this point in the history
Don't require `i18n` in context
  • Loading branch information
jamuhl authored Jul 12, 2018
2 parents cadbe69 + b334c3b commit 2389ea8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Trans.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ Trans.propTypes = {
// };

Trans.contextTypes = {
i18n: PropTypes.object.isRequired,
i18n: PropTypes.object,
t: PropTypes.func
};
2 changes: 1 addition & 1 deletion test/trans.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Trans from '../src/Trans';
describe('trans', () => {
it('should have some stuff', () => {
expect(Trans.contextTypes.i18n)
.toBe(PropTypes.object.isRequired);
.toBe(PropTypes.object);
expect(Trans.propTypes.i18n)
.toBe(PropTypes.object);
expect(Trans.propTypes.t)
Expand Down

0 comments on commit 2389ea8

Please sign in to comment.