Skip to content
Browse files

layout support

  • Loading branch information...
1 parent 9cd7eff commit 200db22be2e1b93e9e032ea078852823159250be @pauliusuza pauliusuza committed
Showing with 9 additions and 5 deletions.
  1. +9 −5 lib/view.js
View
14 lib/view.js
@@ -70,11 +70,15 @@ var View = Class.create ({
var local = options;
if (opts) utils.merge(local, opts);
var localext = local.engine || self.defaultEngine;
- self.engine(local.settings.views+'/'+locpath+'.'+localext, local, return function(lerr, lres) {
- return lres
- });
-
- };
+ var result;
+ while(result == undefined) {
+ self.engine(local.settings.views+'/'+locpath+'.'+localext, local, function(lerr, lres) {
+ if(lerr) result = lerr;
+ result = lres;
+ });
+ }
+ return result;
+ };
if(layout != false) {
options.body = res;

0 comments on commit 200db22

Please sign in to comment.
Something went wrong with that request. Please try again.