From 08bcfc5c4e123f7382c06d182350b6df70438c47 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 19 Dec 2017 17:15:06 +0000 Subject: [PATCH] Make sure that capabilities array is initialised. --- src/components/views/elements/AppTile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 770406e645..ea4f07e657 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -339,6 +339,7 @@ export default React.createClass({ this.widgetMessaging.addEndpoint(this.props.id, this.props.url); this.widgetMessaging.getCapabilities().then((capabilities) => { console.log("Got widget capabilities", this.widgetId, capabilities); + capabilities = capabilities || []; this.setState({capabilities}); }).catch((err) => { console.log("Failed to get widget capabilities", this.widgetId, err);