fix XML on change

This commit is contained in:
fbruc03 2023-02-06 12:57:23 +01:00
parent e1b659cda5
commit 426d618769

View File

@ -43,7 +43,7 @@ class BlocklyWindow extends Component {
componentDidUpdate(props) { componentDidUpdate(props) {
const workspace = Blockly.getMainWorkspace(); const workspace = Blockly.getMainWorkspace();
var xml = this.props.initialXml; var xml = localStorage.getItem("autoSaveXML");
if (props.selectedBoard !== this.props.selectedBoard) { if (props.selectedBoard !== this.props.selectedBoard) {
// change board // change board
if(!xml) xml = initialXml; if(!xml) xml = initialXml;