mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
About halfway through converting all tags to async
This commit is contained in:
+2
-2
@@ -38,12 +38,12 @@ var render = {
|
||||
renderTag: function(template, scope, register) {
|
||||
if (template.name === 'continue') {
|
||||
scope.set('forloop.skip', true);
|
||||
return;
|
||||
return Promise.resolve('');
|
||||
}
|
||||
if (template.name === 'break') {
|
||||
scope.set('forloop.stop', true);
|
||||
scope.set('forloop.skip', true);
|
||||
return;
|
||||
return Promise.resolve('');
|
||||
}
|
||||
return template.render(scope, register);
|
||||
},
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
const lexical = require('./lexical.js');
|
||||
const Promise = require('any-promise');
|
||||
const Exp = require('./expression.js');
|
||||
const TokenizationError = require('./error.js').TokenizationError;
|
||||
|
||||
@@ -21,7 +22,7 @@ module.exports = function() {
|
||||
var reg = register[this.name];
|
||||
if(!reg) reg = register[this.name] = {};
|
||||
var obj = hash(this.token.args, scope);
|
||||
return this.tagImpl.render && this.tagImpl.render(scope, obj, reg) || '';
|
||||
return this.tagImpl.render && this.tagImpl.render(scope, obj, reg) || Promise.resolve('');
|
||||
},
|
||||
parse: function(token, tokens){
|
||||
this.type = 'tag';
|
||||
|
||||
Reference in New Issue
Block a user