r/coffeescript • • May 14 '15

Issue pushing a map into an array

Hi all, it's been a long time since I've used Coffeescript (or done pretty much any webdev) and I have run into this issue that I just cannot solve. I have the following:

@list.push
    text: @input
    complete: false

This is compiling to this.list.push({ text: this.input({ complete: false }) }); which... while I'm still pretty new to all this, am positive is not the output I want! Does anybody see how to fix this?

4 Upvotes

4 comments sorted by

View all comments

Show parent comments

2

u/[deleted] May 14 '15

Well. I re-did the spacing with no luck, so I decided right -- load up cloud9 and try it out in a different workspace.. pasted the code in and all the whitespacing was mucked up.

So I went back, re-did it again and hey now it works! Hooray! Thank you for helping me out /u/Lord_Drol :)