From 4e07a608d38a585e0f3c04e26b9f5e0e404824b1 Mon Sep 17 00:00:00 2001 From: Arun Kumar Date: Thu, 18 Mar 2021 01:04:02 +0530 Subject: [PATCH] Allow updating name on updateScene --- src/components/App.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 7455e416a..4afe24cf8 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1309,11 +1309,18 @@ class App extends React.Component { history.resumeRecording(); } - // currently we only support syncing background color - if (sceneData.appState?.viewBackgroundColor) { - this.setState({ - viewBackgroundColor: sceneData.appState.viewBackgroundColor, - }); + // currently we only support syncing background color and name + if (sceneData.appState) { + if (sceneData.appState.viewBackgroundColor) { + this.setState({ + viewBackgroundColor: sceneData.appState.viewBackgroundColor, + }); + } + if (sceneData.appState.name) { + this.setState({ + name: sceneData.appState.name, + }); + } } if (sceneData.elements) {