Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:58
    matthewp commented #5459
  • 15:10
    rjgotten edited #5467
  • 15:10
    rjgotten edited #5467
  • 15:09
    rjgotten opened #5467
  • 14:57
    rjgotten commented #5459
  • 14:55
    rjgotten commented #5459
  • 14:55
    rjgotten commented #5459
  • 14:50
    rjgotten opened #5466
  • 13:23
    rjgotten edited #5463
  • 04:24

    greenkeeper[bot] on @octokit

    (compare)

  • 04:23

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Jan 28 17:46

    greenkeeper[bot] on @octokit

    (compare)

  • Jan 28 17:44

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Jan 28 16:41
    cherifGsoul edited #5465
  • Jan 28 16:40
    cherifGsoul labeled #5465
  • Jan 28 16:40
    cherifGsoul opened #5465
  • Jan 27 21:03
    justinbmeyer commented #5464
  • Jan 27 20:33
    bmomberger-bitovi opened #5464
  • Jan 27 19:13

    greenkeeper[bot] on @octokit

    (compare)

  • Jan 27 19:12

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

Mohamed Cherif Bouchelaghem
@cherifGsoul
emm an old version!! I think its was a bug to define can.compute in a map
Paulius
@paulius005
Yeah, we've spent most of the quarter trying to update. We're making great progress, now we're running into heap size issues while building. We're just hoping we don't have to upgrade steal before finishing the canjs update
Mohamed Cherif Bouchelaghem
@cherifGsoul
the compute problem was corrected in 2.2.0I gues
Paulius
@paulius005
thanks!
attr('change') it is
Nikolay Nadorichev
@Luanre
Is it possible to render component's template only if no content passed to can.Component ?
Chris Gomez
@akagomez
@Luanre That’s a good question. As far as I know, no.
Mohamed Cherif Bouchelaghem
@cherifGsoul
@Luanre I was wondering that too for example page component should only change the content
Matthew Phillips
@matthewp
You could implement this yourself in inserted
something like
this.attr("emptyContents", this.element.children().length === 0)
this wouldn't be dynamic, of course
would need mutation observers for that
Nikolay Nadorichev
@Luanre
I've tried it
Mohamed Cherif Bouchelaghem
@cherifGsoul
@matthewp a use case for this hybrid mobile apps
Nikolay Nadorichev
@Luanre
in inserted event component already have rendered template
Matthew Phillips
@matthewp
it should be empty though, right?
unless you have stuff in your own template
you want to wrap your own template like
{{#if emptyContents}} ... {{/if}}
Nikolay Nadorichev
@Luanre
Ah, yeah, works like a charm, thank you!
my mistake was: {{#if emptyContents}}...{{else}}<content />{{/if}}
Paul Tichonczuk
@tracer99
If a key in a map is "watch", FF throws an error: 'TypeError: missing argument 1 when calling function this[prop]' because watch is a function in can.Map
should I file this as a bug or is there something I'm missing?
Matthew Phillips
@matthewp
there's a function named watch on can.Map?
is that your function?
Paul Tichonczuk
@tracer99
no
sec. I'll get you the details
Matthew Phillips
@matthewp
map = new can.Map
map.watch // -> undefined
Paul Tichonczuk
@tracer99
when I do this in FF I get function
I assumed it was a CanJS thing, but I can't actual find where this function is defined
Paul Tichonczuk
@tracer99
of course I wouldn't be accessing map.watch but running map.attr("watch"); which is when the error is thrown
Matthew Phillips
@matthewp
what happens if you try map.attr("toString") ? same behavior?
Paul Tichonczuk
@tracer99
hah
it returns the toString function reference
it does not throw an error
m.attr("toString", "something"); throws TypeError: [].slice is not a function
Chris Gomez
@akagomez
Can you print the fn with map.watch?
console.log(map.watch)
Paul Tichonczuk
@tracer99
"function watch()"
if you use get and set directly, it works fine
only when using attr does it not work correctly (or accessing the property directly like above)
Matthew Phillips
@matthewp
I would file an issue, might be able to do something about it
I bet we are not using hasOwnProperty
Paul Tichonczuk
@tracer99
I might just fix it and submit a patch
Guido Smeets
@gsmeets

hmm, I just noticed that my can.components don't unregister events when they're removed from the DOM
is that behaviour intentional?

Nothing in the docs state that you should add a remove event that calls this.off(), seems a bit weird to have to do that.

Chris Gomez
@akagomez
@gsmeets That is odd. I found this in component.js, but no calls to .off(): https://github.com/bitovi/canjs/blob/master/component/component.js#L272-L277
Guido Smeets
@gsmeets
hmm, the bug is actually a bit more subtle than I expected