Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Safetify" won't work over undefined reference #56

Closed
wants to merge 2 commits into from

Conversation

violy
Copy link

@violy violy commented Mar 24, 2015

tested only on osX

@violy violy mentioned this pull request Mar 24, 2015
@quinkennedy
Copy link
Member

@robotconscience my instinct is to discard this pull request since it has been a while, and as I point out in #55 Node 0.10 is no longer supported by Node.js. Maybe I'm being too harsh, seeing as someone just ran into this problem this week.

@robotconscience
Copy link
Member

Hm, I think it's a pretty minimal PR, though. And based on your comment at the end, I think we should merge it! Your call, though,

@quinkennedy
Copy link
Member

I'm slightly concerned about including commit 539ed07 with this merge, but I don't think it will unnecessarily obscure future bugs.

@robotconscience
Copy link
Member

We could do:

Handlebars.registerHelper('Safetify', function(val){
   // warn on null value
   if ( val === undefined || val = null ){
     console.log("[Spacebrew] Warning: bad value passed to 'registerHelper'");
   }
   return String(val).Safetify();
  }
);        

@quinkennedy
Copy link
Member

I just tested violy/master using Node 5.6.0 and got a core dump when a client registers. won't merge. I believe 0.10 is far enough ago that we should not be adding special handling for it. changing Safetify can be handled under a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants