Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Fix error with no close button
Browse files Browse the repository at this point in the history
  • Loading branch information
joeattardi committed May 18, 2022
1 parent c6a77cb commit eadfeff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

For full details, see the documentation at [https://picmojs.com](https://picmojs.com).

## [5.0.1] - 2022-05-18

### Changed

- Fixed exception being thrown when opening a popup picker with `showCloseButton: false` set.

## [5.0.0] - 2022-05-15

First PicMo release (previously Emoji Button).
Expand Down
24 changes: 13 additions & 11 deletions packages/popup-picker/src/popupPicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,19 @@ export class PopupPickerController {
}

private animateCloseButton(openState: boolean) {
return animate(this.closeButton, {
opacity: [0, 1]
},
{
duration: 25,
id: openState ? 'show-close' : 'hide-close',
easing: 'ease-in-out',
direction: openState ? 'normal' : 'reverse',
fill: 'both',
},
this.options)
if (this.closeButton) {
return animate(this.closeButton, {
opacity: [0, 1]
},
{
duration: 25,
id: openState ? 'show-close' : 'hide-close',
easing: 'ease-in-out',
direction: openState ? 'normal' : 'reverse',
fill: 'both',
},
this.options);
}
}

/**
Expand Down

0 comments on commit eadfeff

Please sign in to comment.