You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Wrap getAppVersion() in promise
in case it throws
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user