From 857c0d174742e43547a6ae585f0c0c5988598d84 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 11 Nov 2016 10:05:53 +0000 Subject: [PATCH] Wrap getAppVersion() in promise in case it throws --- src/components/structures/UserSettings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index c139999748..c6efc55607 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -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,