mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-28 17:20:13 +02:00
save to "code" key whenever currentItem is set so that it opens on next reload
This commit is contained in:
@@ -416,7 +416,10 @@ export default class App extends Component {
|
||||
item.jsMode = item.jsMode || this.state.prefs.jsMode || JsModes.JS;
|
||||
}
|
||||
|
||||
this.setState({ currentItem: item }, d.resolve);
|
||||
this.setState({ currentItem: item }, () => {
|
||||
d.resolve();
|
||||
this.saveCode('code');
|
||||
});
|
||||
|
||||
// Reset auto-saving flag
|
||||
this.isAutoSavingEnabled = false;
|
||||
|
Reference in New Issue
Block a user