Quantcast
Viewing all articles
Browse latest Browse all 3491

Re : Can.view Deferred getting resolved after controller has been destroyed

One of my colleagues found another way and that is to wrap this.element with jquery $(this.element). If this.element is null, then we get back an empty jQuery element which should not error out even if you try to call .html() on it.

This seems to be cleaner and doesn't require adding if(this.element) check everywhere.

Thanks,
Colin

Viewing all articles
Browse latest Browse all 3491

Trending Articles