Commit baa1d40c authored by Tim Zallmann's avatar Tim Zallmann

Added compute property to diff file + changed a for loop

parent b6a2e655
......@@ -46,6 +46,9 @@ export default {
showExpandMessage() {
return this.isCollapsed && !this.isLoadingCollapsedDiff && !this.file.tooLarge;
},
showLoadingIcon() {
return this.isLoadingCollapsedDiff || (!this.file.renderIt && !this.isCollapsed);
},
},
methods: {
...mapActions('diffs', ['loadCollapsedDiff']),
......@@ -133,7 +136,7 @@ export default {
:diff-file="file"
/>
<loading-icon
v-if="isLoadingCollapsedDiff || (!file.renderIt && !isCollapsed)"
v-else-if="showLoadingIcon"
class="diff-content loading"
/>
<div
......
......@@ -34,7 +34,7 @@ export default {
if (file.highlightedDiffLines) {
const linesLength = file.highlightedDiffLines.length;
let u = 0;
let u;
for (u = 0; u < linesLength; u += 1) {
const line = file.highlightedDiffLines[u];
delete line.text;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment