Add null-guard to support browsers that don't support performance
Like Tor. Fixes https://github.com/vector-im/riot-web/issues/6781pull/21833/head
parent
f55409fd39
commit
6a317569d7
|
@ -398,6 +398,9 @@ export default React.createClass({
|
|||
},
|
||||
|
||||
startPageChangeTimer() {
|
||||
// Tor doesn't support performance
|
||||
if (!performance || !performance.mark) return null;
|
||||
|
||||
// This shouldn't happen because componentWillUpdate and componentDidUpdate
|
||||
// are used.
|
||||
if (this._pageChanging) {
|
||||
|
@ -409,6 +412,9 @@ export default React.createClass({
|
|||
},
|
||||
|
||||
stopPageChangeTimer() {
|
||||
// Tor doesn't support performance
|
||||
if (!performance || !performance.mark) return null;
|
||||
|
||||
if (!this._pageChanging) {
|
||||
console.warn('MatrixChat.stopPageChangeTimer: timer not started');
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue