Update PR with comment to explain odd bit of code.

From: Steven [mailto:notifications@github.com]
Sent: Wednesday, October 30, 2013 8:52 AM
To: linkedin/dustjs
Cc: Ragan, Richard
Subject: Re: [dustjs] Fix issue #341 where falsey values in iteration break getPath (#357)


In lib/dust.js:

> @@ -250,6 +250,9 @@ Context.prototype.getPath = function(cur, down) {

>    dust.log('Searching for reference [{' + down.join('.') + '}] in template [' + this.templateName + ']', DEBUG);

>    if (cur && len === 0) return ctx.head;

>    ctx = ctx.head;

> +  if (!ctx) {

> +    ctx = ' ';

Should this be an empty string instead of a single space?

—
Reply to this email directly or view it on GitHub<https://github.com/linkedin/dustjs/pull/357/files#r7315523>.