mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-20 15:00:42 -07:00
5.0.1
This commit is contained in:
Vendored
+8
-3
@@ -965,12 +965,17 @@ var Scope = {
|
|||||||
}
|
}
|
||||||
var key = paths.shift();
|
var key = paths.shift();
|
||||||
var value = getValueFromScopes(key, scopes);
|
var value = getValueFromScopes(key, scopes);
|
||||||
return paths.reduce(function (value, key) {
|
if (_.isNil(value)) {
|
||||||
|
throw new TypeError('undefined variable: ' + key);
|
||||||
|
}
|
||||||
|
while (paths.length) {
|
||||||
|
key = paths.shift();
|
||||||
|
value = getValueFromParent(key, value);
|
||||||
if (_.isNil(value)) {
|
if (_.isNil(value)) {
|
||||||
throw new TypeError('undefined variable: ' + key);
|
throw new TypeError('undefined variable: ' + key);
|
||||||
}
|
}
|
||||||
return getValueFromParent(key, value);
|
}
|
||||||
}, value);
|
return value;
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "liquidjs",
|
"name": "liquidjs",
|
||||||
"version": "5.0.0",
|
"version": "5.0.1",
|
||||||
"description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.",
|
"description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user