Skip to content

Commit

Permalink
fix: only createIntl from filteredProps
Browse files Browse the repository at this point in the history
Before `intl` object would have `children` since we pass the full props
in. This gets rid of that
  • Loading branch information
longlho committed Aug 2, 2019
1 parent 4138bba commit d665f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default class IntlProvider extends React.PureComponent<
defaultFormats,
onError,
} = props;
const filteredProps = {
const filteredProps: OptionalIntlConfig = {
locale,
timeZone,
formats,
Expand All @@ -90,7 +90,7 @@ export default class IntlProvider extends React.PureComponent<
};
if (!shallowEquals(prevProps, filteredProps)) {
return {
intl: createIntl(props, cache),
intl: createIntl(filteredProps, cache),
prevProps: filteredProps,
};
}
Expand Down

0 comments on commit d665f31

Please sign in to comment.