Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
825fea63
Commit
825fea63
authored
Oct 26, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove array destructuring until we can fix babel config
parent
1d3b7768
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
app/assets/javascripts/diff.js.es6
app/assets/javascripts/diff.js.es6
+6
-2
No files found.
app/assets/javascripts/diff.js.es6
View file @
825fea63
...
@@ -22,7 +22,11 @@
...
@@ -22,7 +22,11 @@
handleClickUnfold(event) {
handleClickUnfold(event) {
const $target = $(event.target);
const $target = $(event.target);
const [oldLineNumber, newLineNumber] = this.lineNumbers($target.parent());
// current babel config relies on iterators implementation, so we cannot simply do:
// const [oldLineNumber, newLineNumber] = this.lineNumbers($target.parent());
const ref = this.lineNumbers($target.parent());
const oldLineNumber = ref[0];
const newLineNumber = ref[1];
const offset = newLineNumber - oldLineNumber;
const offset = newLineNumber - oldLineNumber;
const bottom = $target.hasClass('js-unfold-bottom');
const bottom = $target.hasClass('js-unfold-bottom');
let since, to;
let since, to;
...
@@ -38,7 +42,7 @@
...
@@ -38,7 +42,7 @@
to = lineNumber;
to = lineNumber;
// make sure we aren't loading more than we need
// make sure we aren't loading more than we need
const
[prevOldLine, prevNewLine] = this.lineNumbers($target.parent().prev())
;
const
prevNewLine = this.lineNumbers($target.parent().prev())[1]
;
if (since <= prevNewLine + 1) {
if (since <= prevNewLine + 1) {
since = prevNewLine + 1;
since = prevNewLine + 1;
unfold = false;
unfold = false;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment