infogare-api.js
Advanced tools
Comparing version 1.0.11 to 1.0.12
{ | ||
"name": "infogare-api.js", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"main": "src/core/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -325,4 +325,10 @@ const User = require('./User'); | ||
} | ||
const train = new Train(await response.json()); | ||
return train; | ||
const trainJSON = await response.json(); | ||
if (!trainJSON.mission) { | ||
const train = new Train(trainJSON); | ||
return train; | ||
} else { | ||
const train = new TrainRER(trainJSON); | ||
return train; | ||
} | ||
} | ||
@@ -329,0 +335,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22110
722