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

[git] Error when restoring the state of the Git Commit Details view #1770

Closed
kittaakos opened this issue Apr 24, 2018 · 4 comments
Closed

[git] Error when restoring the state of the Git Commit Details view #1770

kittaakos opened this issue Apr 24, 2018 · 4 comments
Labels
bug bugs found in the application git issues related to git

Comments

@kittaakos
Copy link
Contributor

Steps to reproduce:

  • Open Git History view.
  • Open details.
  • Refresh browser.

logger.ts:62 TypeError: authorDate.toLocaleDateString is not a function at GitCommitDetailWidget.../../packages/git/lib/browser/history/git-commit-detail-widget.js.GitCommitDetailWidget.renderDiffListHeader (git-commit-detail-widget.ts:63) at GitCommitDetailWidget.../../packages/git/lib/browser/diff/git-diff-widget.js.GitDiffWidget.render (git-diff-widget.ts:105) at GitCommitDetailWidget.../../packages/core/lib/browser/widgets/virtual-widget.js.VirtualWidget.onUpdateRequest (virtual-widget.ts:25) at GitCommitDetailWidget.../../packages/git/lib/browser/git-navigable-list-widget.js.GitNavigableListWidget.onUpdateRequest (git-navigable-list-widget.ts:45) at GitCommitDetailWidget.../../node_modules/@phosphor/widgets/lib/widget.js.Widget.processMessage (widget.js:489) at invokeHandler (index.js:433) at sendMessage (index.js:169) at runMessageLoop (index.js:483)`

@kittaakos kittaakos added bug bugs found in the application git issues related to git labels Apr 24, 2018
@kittaakos
Copy link
Contributor Author

This is due to the incorrect storeState/restoreState in the git-diff-widget.ts. We store the Date as a string from the options and we expect to have a Date object instead of a `string.

@elaihau
Copy link
Contributor

elaihau commented Jun 21, 2018

I cannot observe this error from my environment. Or maybe I misunderstand the steps to reproduce ?

peek 2018-06-21 14-09

@kittaakos
Copy link
Contributor Author

Click here:
screen shot 2018-06-21 at 20 21 39

gh-1770

@kittaakos
Copy link
Contributor Author

@elaihau, just in case you start working on this, we need to consider whether we want to switch from the epoch number to the ISO string representation of the author-date.

This was originally proposed here: #1754 (comment)

vince-fugnitto added a commit that referenced this issue Nov 6, 2018
Fixes #1770
Fixes #1754

- Fixes error thrown when attempting to perform `Date.toLocaleDateString` in the `git-commit-detail-widget`.
- Fixes error thrown when attempting to iterate over `fileChangeNodes` and it is `undefined`.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Nov 7, 2018
Fixes #1770
Fixes #1754

- Fixes error thrown when attempting to perform `Date.toLocaleDateString` in the `git-commit-detail-widget`.
- Fixes error thrown when attempting to iterate over `fileChangeNodes` and it is `undefined`.
- Fix typo when no git history is available
- Simplify logic in `addCommits`

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Nov 7, 2018
Fixes #1770
Fixes #1754

- Fixes error thrown when attempting to perform `Date.toLocaleDateString` in the `git-commit-detail-widget`.
- Fixes error thrown when attempting to iterate over `fileChangeNodes` and it is `undefined`.
- Fix typo when no git history is available
- Simplify logic in `addCommits`
- Refactor `epoch` time to instead use `ISO` strings

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Nov 8, 2018
Fixes #1770
Fixes #1754

- Fixes error thrown when attempting to perform `Date.toLocaleDateString` in the `git-commit-detail-widget`.
- Fixes error thrown when attempting to iterate over `fileChangeNodes` and it is `undefined`.
- Simplify logic in `addCommits`
- Refactor `epoch` time to instead use `ISO` strings

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
kittaakos pushed a commit that referenced this issue Nov 8, 2018
Fixes #1770
Fixes #1754

- Fixes error thrown when attempting to perform `Date.toLocaleDateString` in the `git-commit-detail-widget`.
- Fixes error thrown when attempting to iterate over `fileChangeNodes` and it is `undefined`.
- Simplify logic in `addCommits`
- Refactor `epoch` time to instead use `ISO` strings

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
bogthe pushed a commit to ARMmbed/theia that referenced this issue Jan 21, 2019
Fixes eclipse-theia#1770
Fixes eclipse-theia#1754

- Fixes error thrown when attempting to perform `Date.toLocaleDateString` in the `git-commit-detail-widget`.
- Fixes error thrown when attempting to iterate over `fileChangeNodes` and it is `undefined`.
- Simplify logic in `addCommits`
- Refactor `epoch` time to instead use `ISO` strings

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
Signed-off-by: Bogdan Stolojan <petre.stolojan@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application git issues related to git
Projects
None yet
Development

No branches or pull requests

2 participants