|
|
|
@ -155,7 +155,7 @@
|
|
|
|
|
|
|
|
|
|
block = template.replace(new RegExp("[\\s\\S]*<!--[\\s]*BEGIN " + block + "[\\s]*-->[\r\n]*([\\s\\S]*?)[\r\n]*<!--[\\s]*END " + block + "[\\s]*-->[\\s\\S]*", 'g'), '$1');
|
|
|
|
|
|
|
|
|
|
if (typeof block === "undefined") {
|
|
|
|
|
if (typeof block === "undefined" || !array[key].length) {
|
|
|
|
|
return template;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -255,7 +255,7 @@
|
|
|
|
|
continue;
|
|
|
|
|
} else if (obj[key] === null) {
|
|
|
|
|
template = replace(template, namespace + key, '');
|
|
|
|
|
} else if (obj[key].constructor === Array && obj[key].length) {
|
|
|
|
|
} else if (obj[key].constructor === Array) {
|
|
|
|
|
template = parseArray(template, obj, key, namespace + key + '.', bind);
|
|
|
|
|
} else if (obj[key] instanceof Object) {
|
|
|
|
|
defineParent(obj[key], originalObj);
|
|
|
|
|