Skip to content

Commit f0d3094

Browse files
authored
fix: empty store.code after changing templates (#138)
* fix: #131 (comment) * fix: swap data.py and main.py in text * fix: empty store.code before hand to show loading stauts
1 parent 7683ede commit f0d3094

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/store.js

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export function saveConfig(key, value) {
6060
// render the code if there are fetched files for current selected template
6161
export function genCode() {
6262
const currentFiles = files[store.config.template]
63+
store.code = {}
6364
if (currentFiles && Object.keys(currentFiles).length) {
6465
for (const file in currentFiles) {
6566
if (!store.config.include_test && file === 'test_all.py') {

src/templates/templates.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"template-text-classification": [
3636
"README.md",
3737
"config.yaml",
38-
"main.py",
3938
"data.py",
39+
"main.py",
4040
"model.py",
4141
"trainers.py",
4242
"utils.py",

0 commit comments

Comments
 (0)