Skip to content
This repository was archived by the owner on Oct 24, 2019. It is now read-only.

Commit 2e3cf5b

Browse files
author
jung-han
committed
chore: apply review
1 parent 2b436c5 commit 2e3cf5b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ export default class Grid extends React.Component {
3636
}
3737

3838
componentDidMount() {
39-
const {
40-
frozenColumnCount: frozenCount = 0,
41-
columnOptions: columnOptionsProp = {}
42-
} = this.props;
43-
44-
const columnOptions = {
45-
...columnOptionsProp,
46-
frozenCount
47-
};
39+
const { frozenColumnCount: frozenCount, columnOptions: columnOptionsProp = {} } = this.props;
40+
41+
const columnOptions =
42+
typeof frozenCount === 'number'
43+
? {
44+
...columnOptionsProp,
45+
frozenCount
46+
}
47+
: { ...columnOptionsProp };
4848

4949
this.gridInst = new TuiGrid({
5050
el: this.rootEl.current,

0 commit comments

Comments
 (0)