Skip to content

Commit

Permalink
Fix placeholder to add license formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed Jul 30, 2021
1 parent 91ac38c commit b4ceb43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/app/web/statics/app.placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
computed: {
commits: faker.datatype.number(10000),
sponsorships: faker.datatype.number(10),
licenses: { favorite: [""], used: { MIT: 1 } },
licenses: { favorite: [""], used: { MIT: 1 }, about:{} },
token: { scopes: [] },
repositories: {
watchers: faker.datatype.number(1000),
Expand Down Expand Up @@ -1055,6 +1055,9 @@
data.f.date = function(string, options) {
return new Intl.DateTimeFormat("en-GB", options).format(new Date(string))
}
data.f.license = function(text) {
return text?.name ?? text
}
//Render
return await ejs.render(image, data, { async: true, rmWhitespace: true })
}
Expand Down

0 comments on commit b4ceb43

Please sign in to comment.