mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 06:58:25 +00: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;
|
this._unmounted = false;
|
||||||
|
|
||||||
if (PlatformPeg.get()) {
|
if (PlatformPeg.get()) {
|
||||||
PlatformPeg.get().getAppVersion().done((appVersion) => {
|
q().then(() => {
|
||||||
|
return PlatformPeg.get().getAppVersion();
|
||||||
|
}).done((appVersion) => {
|
||||||
if (this._unmounted) return;
|
if (this._unmounted) return;
|
||||||
this.setState({
|
this.setState({
|
||||||
vectorVersion: appVersion,
|
vectorVersion: appVersion,
|
||||||
|
|||||||
Reference in New Issue
Block a user