Skip to content

Commit

Permalink
[fix] matchMedia memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-go committed Sep 26, 2023
1 parent 5c8e4c2 commit 8fd3b33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/emoji-mart/src/components/Picker/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class Picker extends Component {

componentWillUnmount() {
this.unregister()
this.darkMedia?.removeEventListener(this.darkMediaCallback);
this.darkMedia?.removeListener(this.darkMediaCallback);
}

async reset(nextState = {}) {
Expand Down

0 comments on commit 8fd3b33

Please sign in to comment.