mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-11-25 20:42:40 +00:00
More handlebar helper bugs
This commit is contained in:
@@ -196,7 +196,7 @@ class Injectables {
|
|||||||
let contents;
|
let contents;
|
||||||
|
|
||||||
if (fn) {
|
if (fn) {
|
||||||
contents = stripIndent(fn(data));
|
contents = stripIndent(fn(data.root));
|
||||||
} else {
|
} else {
|
||||||
let tpath = args.shift();
|
let tpath = args.shift();
|
||||||
tpath = self._parsePath(tpath, data.root.local, 'md');
|
tpath = self._parsePath(tpath, data.root.local, 'md');
|
||||||
@@ -215,7 +215,7 @@ class Injectables {
|
|||||||
return function (tpath, ...args) {
|
return function (tpath, ...args) {
|
||||||
const { hash, data } = args.pop();
|
const { hash, data } = args.pop();
|
||||||
const value = args.shift();
|
const value = args.shift();
|
||||||
const context = handlebars.createFrame(value || data);
|
const context = handlebars.createFrame(value || data.root);
|
||||||
Object.assign(context, hash || {});
|
Object.assign(context, hash || {});
|
||||||
|
|
||||||
tpath = self._parsePath(tpath, data.root.local, 'hbs');
|
tpath = self._parsePath(tpath, data.root.local, 'hbs');
|
||||||
|
|||||||
Reference in New Issue
Block a user