Skip to content

Commit

Permalink
Fixes #2 - Lasso v3 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
austinkelleher committed Oct 2, 2017
1 parent a2d382d commit f4287e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/asset-var/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ module.exports = function(input, out) {

function lassoResource(lasso, context, path) {
return new Promise(function(resolve, reject) {
lasso.lassoResource(path, context, function(err, result) {
const result = lasso.lassoResource(path, context, function(err, result) {
if(err) return reject(err);
else resolve(result);
});

if (result && result.then) {
result.then((data) => resolve(data))
.catch((err) => reject(err))
}
});
}

0 comments on commit f4287e6

Please sign in to comment.