Commit bd5ea484 authored by Phil Hughes's avatar Phil Hughes

fixed karma test

updated controller based on review
parent eacd821a
......@@ -14,7 +14,7 @@
},
computed: {
lineClasses() {
return new Array(this.lines).fill().map((_, i) => `skeleton-line-${i}`);
return new Array(this.lines).fill().map((_, i) => `skeleton-line-${i + 1}`);
},
},
};
......
......@@ -56,11 +56,12 @@ class Projects::RefsController < Projects::ApplicationController
contents[@offset, @limit].to_a.map do |content|
file = @path ? File.join(@path, content.name) : content.name
last_commit = @repo.last_commit_for_path(@commit.id, file)
commit_path = project_commit_path(@project, last_commit) if last_commit
{
file_name: content.name,
commit: last_commit,
type: content.type,
commit_path: (project_commit_path(@project, last_commit) unless last_commit.nil?)
commit_path: commit_path
}
end
end
......
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