javascript - underscorejs render different results depending on environment when passing strings with colons to it -


i'm running framework meteor based on nodejs. when use underscorejs on server strange results. on server code returns true

_.contains(['s:s:s'], 's:s'); 

but in chromes inspector returns false (as expected).

on underscorejs says use native indexof internally. code:

['s:s:s'].indexof('s:s') 

return -1 both on server , in inspector (as expected, seems strange renders different results if used internally underscorejs.)

i'm not sure if caused underscorejs, nodejs or meteor.

i've managed replicate result. issue coming underscore, doesn't happen version 1.4.4, 1.4.2.

issue on github: https://github.com/meteor/meteor/issues/1044


Comments

Popular posts from this blog

css - Text drops down with smaller window -

php - Boolean search on database with 5 million rows, very slow -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -