mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
fix diff expand error on empty response
This commit is contained in:
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fixed file extension detection with new spotter version
|
||||
- Fixed wrong cache directory location ([#1236](https://github.com/scm-manager/scm-manager/issues/1236) and [#1242](https://github.com/scm-manager/scm-manager/issues/1242))
|
||||
- Fixed error in update step ([#1237](https://github.com/scm-manager/scm-manager/issues/1237) and [#1244](https://github.com/scm-manager/scm-manager/issues/1244))
|
||||
- Fixed error on empty diff expand response ([#1247](https://github.com/scm-manager/scm-manager/pull/1247))
|
||||
|
||||
## [2.2.0] - 2020-07-03
|
||||
### Added
|
||||
|
||||
@@ -63,7 +63,7 @@ class DiffExpander {
|
||||
return 0;
|
||||
}
|
||||
const changes = this.file.hunks![n].changes;
|
||||
if (changes[changes.length - 1].type === "normal") {
|
||||
if (changes[changes.length - 1]?.type === "normal") {
|
||||
if (n === this.file!.hunks!.length - 1) {
|
||||
return this.file!.hunks![this.file!.hunks!.length - 1].fullyExpanded ? 0 : -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user