[gnome-maps] transitRouter: Use .last() convience method
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] transitRouter: Use .last() convience method
- Date: Mon, 7 Oct 2019 20:20:24 +0000 (UTC)
commit 52b7b0a097ca0c522817ad3092feb24a3e007b3e
Author: Marcus Lundblad <ml update uu se>
Date: Mon Oct 7 22:19:08 2019 +0200
transitRouter: Use .last() convience method
Also remove an erronious debug output.
src/transitRouter.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/transitRouter.js b/src/transitRouter.js
index adf3b23..79fe56d 100644
--- a/src/transitRouter.js
+++ b/src/transitRouter.js
@@ -161,7 +161,6 @@ var TransitRouter = class TransitRoute {
});
});
- Utils.debug('returning matching providers: ' + matchingProviders.length);
return matchingProviders;
}
@@ -173,7 +172,7 @@ var TransitRouter = class TransitRoute {
_getBestProviderForQuery() {
let startLocation = this._query.filledPoints[0].place.location;
let endLocation =
- this._query.filledPoints[this._query.points.length - 1].place.location;
+ this._query.filledPoints.last().place.location;
let matchingProvidersForStart =
this._getMatchingProvidersForLocation(startLocation);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]