Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gauthier-th committed Jun 30, 2021
1 parent b4d5a5f commit d767562
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "divia-api",
"version": "2.2.1",
"version": "2.2.2",
"description": "Dvia API v2",
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Line {
* @returns {Stop}
*/
getStop(id) {
const stop = this.data.arrets[id];
const stop = Object.values(this.data.arrets).find(arret => arret.id === id);
if (stop)
return new Stop(this.api, this, stop);
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DiviaAPI {
* @returns {Line}
*/
getLine(id) {
const line = this.reseau.arborescence.lignes[id];
const line = Object.values(this.reseau.arborescence.lignes).find(ligne => ligne.id === id);
if (line)
return new Line(this, line);
}
Expand Down

0 comments on commit d767562

Please sign in to comment.