Browse Source

142-hastic-server-anomalies-file-missing

pull/1/head
rozetko 7 years ago
parent
commit
59ef4c21fe
  1. 3
      server/src/services/anomalyType.ts

3
server/src/services/anomalyType.ts

@ -37,6 +37,9 @@ let anomaliesNameToIdMap = {};
function loadAnomaliesMap() { function loadAnomaliesMap() {
let filename = path.join(ANOMALIES_PATH, `all_anomalies.json`); let filename = path.join(ANOMALIES_PATH, `all_anomalies.json`);
if(!fs.existsSync(filename)) {
saveAnomaliesMap();
}
anomaliesNameToIdMap = getJsonDataSync(filename); anomaliesNameToIdMap = getJsonDataSync(filename);
} }

Loading…
Cancel
Save