Skip to content

Commit 2b352f8

Browse files
authored
Merge pull request #378 from flut1/localized-no-children-fallback
Default the child element of Localized to null
2 parents 3d15a02 + 6adc54b commit 2b352f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fluent-react/src/localized.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class Localized extends Component {
7979

8080
render() {
8181
const { l10n, parseMarkup } = this.context;
82-
const { id, attrs, children: elem } = this.props;
82+
const { id, attrs, children: elem = null } = this.props;
8383

8484
// Validate that the child element isn't an array
8585
if (Array.isArray(elem)) {

0 commit comments

Comments
 (0)