summaryrefslogtreecommitdiffstats
path: root/lib/models/summary.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/summary.js')
-rw-r--r--lib/models/summary.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/models/summary.js b/lib/models/summary.js
index 8a4afc7..70f0535 100644
--- a/lib/models/summary.js
+++ b/lib/models/summary.js
@@ -74,7 +74,12 @@ Summary.prototype.getByLevel = function(level) {
*/
Summary.prototype.getByPath = function(filePath) {
return this.getArticle(function(article) {
- return (LocationUtils.areIdenticalPaths(article.getPath(), filePath));
+ var articlePath = article.getPath();
+
+ return (
+ articlePath &&
+ LocationUtils.areIdenticalPaths(articlePath, filePath)
+ );
});
};