choojs / hyperx

🏷 - tagged template string virtual dom builder
BSD 2-Clause "Simplified" License
1.01k stars 48 forks source link

Modified 78, 82 to prevent edge cases of functions and objects converting to strings #61

Closed anywhichway closed 6 years ago

anywhichway commented 6 years ago

We had edge cases in nested templates where functions and objects were getting concatenated to empty strings resulting in [Object] or function() { ...} appearing in the rendered HTML. Simply checking that the second argument to concat was not going to be the empty string solved the problem. We ran your tape test suite. All tests passed. We were unable to define a simple unit test that reproduced the error we were having, but it has definitely been resolved.

yoshuawuyts commented 6 years ago

Heya; this patch looks good to me — but could you perhaps remove the comments? I agree with you a test would be better; but the inline comment looks a bit distracting. Thanks!

anywhichway commented 6 years ago

Will do

On Oct 31, 2017 2:51 PM, "Yoshua Wuyts" notifications@github.com wrote:

Heya; this patch looks good to me — but could you perhaps remove the comments? I agree with you a test would be better; but the inline comment looks a bit distracting. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/choojs/hyperx/pull/61#issuecomment-340870077, or mute the thread https://github.com/notifications/unsubscribe-auth/AEuqS5OEqx24B3DPRJvhc6DASbW7ASWJks5sx2wfgaJpZM4QKazs .

anywhichway commented 6 years ago

Comments removed

yoshuawuyts commented 6 years ago

v2.3.2 :tada: