mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
Wrap getAppVersion() in promise
in case it throws
This commit is contained in:
parent
d871ca2b24
commit
857c0d1747
1 changed files with 3 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue