JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Sep 19, 2019 14:31
JS doesn't rebind "this" when you use arrow functions. That's why it worked when you used a normal function declaration
Sep 19, 2019 14:29
Arrow functions bind this differently. It binds this lexically. Or briefly: It uses the context of the surrounding function
 
Apr 12, 2017 13:54
sorry to hear that
Apr 12, 2017 13:54
oh :/
Apr 12, 2017 13:53
sorry that I couldn't really help
Apr 12, 2017 13:53
No problem
Apr 12, 2017 13:53
They are life savers
Apr 12, 2017 13:53
Backups, my friend. Backups.
Apr 12, 2017 13:50
So I could fix it with git checkout HEAD /path/to/file
Apr 12, 2017 13:50
I don't know, sorry :/
It happened only once to me but just with one file
Apr 12, 2017 13:41
why not
Apr 12, 2017 13:40
what is the output
Apr 12, 2017 13:39
so this ^ doesnt work?
Apr 12, 2017 13:39
git reset --hard <your sha>
Apr 12, 2017 13:26
the one from your latest commit. Where your code was still there
Apr 12, 2017 13:23
yes
Apr 12, 2017 13:19
The SHA is the Hash on the left side of your picture
Apr 12, 2017 13:17
@UmairJameel No I mean the SHA of your latest commit you got from the reflog
Apr 12, 2017 13:17
@UmairJameel Ok then run git reset --hard <your sha>
Apr 12, 2017 13:17
@UmairJameel Try to run git reflog and tell me if you see the SHA of your latest commit (HEAD)