andrewplummer/Sugar — Issue #54: string.assign with empty string doesn't work as expected
Author: naasir
Created: 2011-11-14 21:42:27+00:00
State: open

I'm using sugar.js v1.1.1 and I'm trying to do the following:

"here is an empty string:{empty}".assign({ empty: "" });

I expect to get:
"here is an empty string:"

But instead, I get:
"here is an empty string:{empty}"

I also tried assigning my empty parameter to undefined, as well as using the numbered substitutors (e.g. {1}). Same result.
Are my expectations wrong here? Is this by design? Or is this a bug?

Any help on the matter would be appreciated. Thanks.