So i commented out that.

 
Ruckel: Weird that you haven’t faced an issue

Hornbacher: Are you mysteriously authenticating and not realizing? lol

Cindrich: That’d be _very odd_ if you were getting by without it O.o

Feerick: Did something happen to discussion?

Bleggi: Tcsc: what do ya mean?

Rizor: They might restrict certain IP ranges

Feerick: What are you all talking about

Burckhard: Tcsc: whether or not you always had/have to identify w/ NickServ in order to talk in this channel

Leviton: Yay its fixed, thanks jaawerth

Swaggert: Tcsc: yes this is now a BSDM channel

Rizor: Tejasmanohar: until Leviton also had this happen I’d just figured maybe I just hadn’t effectively disconnected in months, unlikely as that is

Rizor: Since whenever it was I last authenticated

Gerrero: Zumba_addict: SyntaxError: missing ; before statement

Rizor: Nope, definitely wasn’t that – looks like I hadn’t even identified since switching znc hosts

Gerrero: Zumba_addict: Function.prototype.bind – JavaScript MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind

Rizor: If you need to search mdn quickly you can also use devdocs.io 😛

Fabela: I’ll put that now in my notes, the string you wrote 😀

Gerrero: Zumba_addict: Function.prototype.bind – JavaScript MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind

Ruelle: I wanted to know why we need to use bind. I’m looking for really simple examples so I can see how it works

Suttin: Or you can search with google with: mdn yourkeyword

Rizor: Or if you want to look stuff up using Gerrero without sending it to the channel you can just /query Gerrero and do “mdn bind” or whatever else

Rizor: Most common is to fix “this” for a function so it’s always a certain value

Rizor: For example, say you have an object method that acts on the object’s “this” and you want to call that in a promise

Leviton: What are good naming conventions for closures? Suppose my outer function takes an express app and returns a middleware function

Rizor: If you do somePromise.thenfoo.doSomething, then doSomething is p***ed in and executed by the promise – and the “this” will be wrong. But you can do somePromise.thenfoo.doSomething.bindfoo

Kundrick: Oh wow, that’s very interesting

Rizor: The other common usecase is partial application – all the arguments to bind after the first will set function args

Reiter: I’m looking at our code

Rizor: Var logMsg = console.log.bindconsole, ‘MSG:’; logMsg’Why hello, there!’;

Gerrero: Rizor: undefined; Console: ‘MSG:’, ‘Why hello, there!’

Pefferkorn: I didn’t write it. It was already there – https://gist.github.com/c0debreaker/d0c2064e5e1eef65fece

Blender: I’m trying to understand what you just posted

Rizor: The extra function wrapping the method in there is unnecessary, though

Rizor: That could just as easily be this.item.fetch.donethis.renderItem.bindthis, this.item

Niez: Actually we have a huge issue with that code that we can’t figure out why

Luckhardt: It only happens when the server becomes unavailable or the network connectivity dies

Mckain: When it makes a request when network is down, it will be pending in chrome dev tools

Bonk: After 2 mins, chrome decides to spit out ERR_EMPTY RESPONSE

Rayburn: It doesn’t go to .fail

Stokley: Now once I restore the connection, all the remaining pending will become 200 OK but the data received is incomplete

Rizor: I don’t know anything about backbone’s fetch

Rizor: But that makes it sound like the request isn’t actually timing out

Barakat: So i commented out that code and use native jquery $.ajax .done and .fail, it was able to capture the error using the same scenario