mirror of
https://github.com/funamitech/mastodon
synced 2024-12-12 13:48:35 +09:00
[Glitch] Fix crash in old browsers
Port abad99fa10
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
c901ae77d4
commit
6be0b4b014
@ -90,7 +90,11 @@ class ColumnsArea extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
if (this.mediaQuery) {
|
||||
if (this.mediaQuery.addEventListener) {
|
||||
this.mediaQuery.addEventListener('change', this.handleLayoutChange);
|
||||
} else {
|
||||
this.mediaQuery.addListener(this.handleLayoutChange);
|
||||
}
|
||||
this.setState({ renderComposePanel: !this.mediaQuery.matches });
|
||||
}
|
||||
|
||||
@ -125,7 +129,11 @@ class ColumnsArea extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
if (this.mediaQuery) {
|
||||
if (this.mediaQuery.removeEventListener) {
|
||||
this.mediaQuery.removeEventListener('change', this.handleLayoutChange);
|
||||
} else {
|
||||
this.mediaQuery.removeListener(this.handleLayouteChange);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user