Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'replace' of null #193

Closed
zenopopovici opened this issue Jun 16, 2017 · 5 comments · Fixed by #233
Closed

Cannot read property 'replace' of null #193

zenopopovici opened this issue Jun 16, 2017 · 5 comments · Fixed by #233

Comments

@zenopopovici
Copy link

zenopopovici commented Jun 16, 2017

Atom: 1.18.0
OS: MacOS 10.12.5

RemoteRevision.js:87 - Uncaught (in promise) TypeError: Cannot read property 'replace' of null(…)
parseProjectAndRepo @ RemoteRevision.js:87
initialize @ RemoteRevision.js:43
RemoteRevision @ RemoteRevision.js:7
(anonymous function) @ BlameGutter.js [sm]:103
_tickCallback @ internal/process/next_tick.js:103```
@mamanguy
Copy link

mamanguy commented Jul 19, 2017

I think it's related to the fact that the remote repo is not called "origin"

@pabra
Copy link
Contributor

pabra commented Jan 8, 2018

It seems to be a duplicate of #14

@fedde-s
Copy link

fedde-s commented Mar 7, 2018

I'm still having this issue, and it's making the plugin completely unusable to me. The gutter appears empty, and even the console message gives no indication of what the plugin wants me to do. A remote repo is unambiguously configured as the upstream of my current HEAD branch, if that's relevant. How do I explain this to the plugin?

@zenopopovici
Copy link
Author

The remote is not called origin ... I'm using the other atom plugin (similar name) because this issue. This plugin looks and behaves much better, but it seems that we're the only ones using 2 or more upstreams with different names.

@fedde-s
Copy link

fedde-s commented Mar 7, 2018

There does seem to be a documented way to manually configure the URL to the remote repo, but it doesn't work. The README documents a way to configure a remote URL (as a fallback if the hard-coded one doesn't work), either per Atom installation or (more appropriate in my case) per .git folder. However, the plugin crashes when constructing a new RemoteRevision() object, before even reaching the .getTemplate() logic that tests whether the hard-coded remote works.

claytonrcarter added a commit to claytonrcarter/git-blame that referenced this issue Aug 2, 2018
Also minor update to README to document the "copy hash on click" feature.
alexcorre pushed a commit that referenced this issue Nov 7, 2018
* Fix #193: don't fail when there is no remote named origin

Also minor update to README to document the "copy hash on click" feature.

* Add a test for when RemoteRevision recieves null or undefined as a remote URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants