Skip to content

Commit

Permalink
Merge pull request #7 from likezero/fix-null
Browse files Browse the repository at this point in the history
fix: panel is null
  • Loading branch information
ziluo committed Jun 27, 2018
2 parents 7e40ef5 + e4f1a28 commit 08edc9f
Show file tree
Hide file tree
Showing 3 changed files with 346 additions and 284 deletions.
2 changes: 1 addition & 1 deletion src/DatePicker.tsx
Expand Up @@ -114,7 +114,7 @@ export default class DatePicker extends Component {
this.setTransform(this.panel.style, `translate3d(0,0,0)`);
this.setTransition(this.panel.style, '.3s');
setTimeout(() => {
this.setTransition(this.panel.style, '');
this.panel && this.setTransition(this.panel.style, '');
}, 300);
}
};
Expand Down
14 changes: 7 additions & 7 deletions tests/__snapshots__/Calendar.spec.tsx.snap
Expand Up @@ -57,37 +57,37 @@ exports[`Calendar english. renders correctly 1`] = `
<div
class="cell cell-grey"
>
Sun
</div>
<div
class="cell"
>
Mon
</div>
<div
class="cell"
>
Tue
</div>
<div
class="cell"
>
Wed
</div>
<div
class="cell"
>
Thu
</div>
<div
class="cell"
>
Fir
</div>
<div
class="cell cell-grey"
>
Sat
</div>
</div>
<div
Expand Down

0 comments on commit 08edc9f

Please sign in to comment.