1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Wrap getAppVersion() in promise

in case it throws
This commit is contained in:
David Baker
2016-11-11 10:05:53 +00:00
parent d871ca2b24
commit 857c0d1747

View File

@@ -68,7 +68,9 @@ module.exports = React.createClass({
this._unmounted = false;
if (PlatformPeg.get()) {
PlatformPeg.get().getAppVersion().done((appVersion) => {
q().then(() => {
return PlatformPeg.get().getAppVersion();
}).done((appVersion) => {
if (this._unmounted) return;
this.setState({
vectorVersion: appVersion,