aboutsummaryrefslogtreecommitdiff
path: root/parseClasses.js
diff options
context:
space:
mode:
Diffstat (limited to 'parseClasses.js')
-rw-r--r--parseClasses.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/parseClasses.js b/parseClasses.js
index 2b3b779..170b63d 100644
--- a/parseClasses.js
+++ b/parseClasses.js
@@ -59,8 +59,10 @@ function addToDBFromLists(DB, l1, l2, l1cond, l2cond)
async function parseClasses(path1, path2, DB)
{
let parsed = [];
+ await DB.query_raw("DELETE FROM classes");
parsed.push(parseClassData(path1, DB));
- parsed.push(parseClassData(path2, DB));
+ if (path2 !== undefined)
+ parsed.push(parseClassData(path2, DB));
return await Promise.all(parsed);
}