Skip to content

Commit

Permalink
Small clarification on findAsset
Browse files Browse the repository at this point in the history
- make sure returned result is either `Asset` or `Null` exactly.
- add info about returned type into api doc
  • Loading branch information
ixti committed Sep 17, 2012
1 parent c09b023 commit 3f56d64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mincer/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Base.prototype.contentTypeOf = function (pathname) {


/**
* Base#findAsset(pathname[, options = {}]) -> Asset
* Base#findAsset(pathname[, options = {}]) -> Asset|Null
* - pathname (String)
* - options (Object)
*
Expand All @@ -288,7 +288,7 @@ Base.prototype.findAsset = function (pathname, options) {

if (isAbsolute(pathname)) {
if (!this.stat(pathname)) {
return;
return null;
}

logical_path = this.attributesFor(pathname).logicalPath;
Expand Down

0 comments on commit 3f56d64

Please sign in to comment.