diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-04-29 23:43:01 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-04-29 23:43:01 +0200 |
commit | 310691bca2459112a586da97573e9a806b673941 (patch) | |
tree | f92e828bde97ad74e374543f40efed455d547ea2 /lib/models | |
parent | 8f7967acd0efcbf9d1483ac33cf26a27baaf4e74 (diff) | |
download | gitbook-310691bca2459112a586da97573e9a806b673941.zip gitbook-310691bca2459112a586da97573e9a806b673941.tar.gz gitbook-310691bca2459112a586da97573e9a806b673941.tar.bz2 |
Use areIdenticalPaths for Summary.getByPath
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/summary.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/models/summary.js b/lib/models/summary.js index 5baebef..5314bb0 100644 --- a/lib/models/summary.js +++ b/lib/models/summary.js @@ -2,6 +2,7 @@ var is = require('is'); var Immutable = require('immutable'); var error = require('../utils/error'); +var LocationUtils = require('../utils/location'); var File = require('./file'); var SummaryPart = require('./summaryPart'); var SummaryArticle = require('./summaryArticle'); @@ -73,7 +74,7 @@ Summary.prototype.getByLevel = function(level) { */ Summary.prototype.getByPath = function(filePath) { return this.getArticle(function(article) { - return (article.getPath() === filePath); + return (LocationUtils.areIdenticalPaths(article.getPath(), filePath)); }); }; |