diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index 40ad9234ed774d4bdbe0b3e0cc8ee78a14de89e7..982f8a5666c7b34fe7791c7c3e4a15fe78bc041d 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -148,11 +148,12 @@ class Blocks extends React.Component { setLocale () { this.workspace.getFlyout().setRecyclingEnabled(false); this.ScratchBlocks.ScratchMsgs.setLocale(this.props.locale); - this.props.vm.setLocale(this.props.locale, this.props.messages); - - this.workspace.updateToolbox(this.props.toolboxXML); - this.props.vm.refreshWorkspace(); - this.workspace.getFlyout().setRecyclingEnabled(true); + this.props.vm.setLocale(this.props.locale, this.props.messages) + .then(() => { + this.workspace.updateToolbox(this.props.toolboxXML); + this.props.vm.refreshWorkspace(); + this.workspace.getFlyout().setRecyclingEnabled(true); + }); } updateToolbox () {