These are chat archives for canjs/canjs

7th
Sep 2017
Julian
@pYr0x
Sep 07 2017 08:43
@bmomberger-bitovi thx ;)
Pedro Mendes
@pmgmendes
Sep 07 2017 13:43
Hi all! When building my donejs project I'm getting a few warning messages generated by can-view-parser regarding unexpected closing tags. Because of the high number of components I'm unable to quickly identify the origin templates. How can I find out? Thanks!
Justin Meyer
@justinbmeyer
Sep 07 2017 16:30
@pmgmendes you could set a breakpoint ... presumably the stack will eventually run up to where steal-stache is compiling the template
Justin Meyer
@justinbmeyer
Sep 07 2017 16:37
127_0_0_1_8080_myhub_html_and_DoneJS_Chicago__Chicago__IL____Meetup.png
@pmgmendes check that out
Kevin Phillips
@phillipskevin
Sep 07 2017 16:40
we have an issue open to improve these warnings: canjs/can-stache#252 if you want to give that a :thumbsup: or :heart:
Nico R.
@nriesco
Sep 07 2017 16:55
@pmgmendes as a workaround you can run npm run build and you’ll get better feedback on where the error is. Sometimes it is enough to find the bug and sometimes it will take weeks to figure it out :-)
Gregg Roemhildt
@roemhildtg
Sep 07 2017 18:38
Hey, any ideas on what could be causing my Promise to be converted into a DefineMap?
image.png
Justin Meyer
@justinbmeyer
Sep 07 2017 18:54
@roemhildtg which version?
of canjs?
older versions might have had two-way bindings
where an object would be merged into a map
this shouldn't happen as much in 3.0, but I guess it could happen
Gregg Roemhildt
@roemhildtg
Sep 07 2017 19:06
I'm using newer 3.x versions
The promise gets passed around a bunch, so I'm not sure where its getting converted
Between components
Justin Meyer
@justinbmeyer
Sep 07 2017 19:07
my guess is a promise is passed to canReflect.update, or canReflect.merge
you might be able to set a breakpoint there
you could also look for when a _handler property is set on a define map
prop would be _handler
Gregg Roemhildt
@roemhildtg
Sep 07 2017 19:11
Okay I'll look into that
which is how expando properties get defined
@phillipskevin I think "observable" type should not mutate promises?
Kevin Phillips
@phillipskevin
Sep 07 2017 19:13
yeah, maybe it shouldn't
Justin Meyer
@justinbmeyer
Sep 07 2017 19:13
so ... isPlainObject ... would be false for a promise
so it shouldn't
I think we are ok
so yeah, the best bet is an update or merge is being called on a map w/ a promise
Kevin Phillips
@phillipskevin
Sep 07 2017 19:17
yeah, you're right, it won't convert promises
Nitin Pasumarthy
@Nithanaroy
Sep 07 2017 20:58

We are using can-connect, ^1.3.6. Observed the recent change in model.save() behavior from sending JSON data (to server) to url-encoded format. We are using baseMap() with our models and unable to save due to request data format change. Any ideas on how to change this setting in baseMap?
what version are you on? we'll investigate why this changed

Can some one help with this issue?

Kevin Phillips
@phillipskevin
Sep 07 2017 21:00
did you submit an issue?
if not, that would help make sure it doesn't get lost
Nitin Pasumarthy
@Nithanaroy
Sep 07 2017 21:05
canjs/can-connect#348
yes, created an issue in can-connect repo
Kevin Phillips
@phillipskevin
Sep 07 2017 21:12
ok, thank you