diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-03-21 20:37:25 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-03-21 20:37:25 +0300 |
commit | b47432a7e20fb92bc4a431a4c6a78a1f2b7de722 (patch) | |
tree | cbd87923fbdbdfbe8145dcb5c538d442278703d1 /app/assets/javascripts/diff.js | |
parent | 5f7292687a29fe13bdee2c1cde808d6d2158fe45 (diff) |
enable Array destructuring and polyfill Symbol class
Diffstat (limited to 'app/assets/javascripts/diff.js')
-rw-r--r-- | app/assets/javascripts/diff.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/assets/javascripts/diff.js b/app/assets/javascripts/diff.js index cfa60325fcc..dca12bbcf10 100644 --- a/app/assets/javascripts/diff.js +++ b/app/assets/javascripts/diff.js @@ -34,10 +34,7 @@ class Diff { handleClickUnfold(e) { const $target = $(e.target); // 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 [oldLineNumber, newLineNumber] = this.lineNumbers($target.parent()); const offset = newLineNumber - oldLineNumber; const bottom = $target.hasClass('js-unfold-bottom'); let since; |