Call correct function on error in fetching assets.

Instead of trying (and failing) to call a function on underscore, call the correct `_callback`.
This commit is contained in:
Utkarsh Upadhyay
2014-11-22 19:00:33 +01:00
committed by David Glasser
parent 8c30bfbef4
commit bf9b67e756

View File

@@ -1291,7 +1291,7 @@ _.extend(JsImage.prototype, {
};
if (!assets || !_.has(assets, assetPath)) {
_.callback(new Error("Unknown asset: " + assetPath));
_callback(new Error("Unknown asset: " + assetPath));
} else {
var buffer = assets[assetPath];
var result = encoding ? buffer.toString(encoding) : buffer;