From b4ceb43b15a469f0e943162db3a378df3b44cb8d Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Fri, 30 Jul 2021 20:53:57 +0200 Subject: [PATCH] Fix placeholder to add license formatter --- source/app/web/statics/app.placeholder.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/app/web/statics/app.placeholder.js b/source/app/web/statics/app.placeholder.js index 211cc6fb494..63d4cc5176d 100644 --- a/source/app/web/statics/app.placeholder.js +++ b/source/app/web/statics/app.placeholder.js @@ -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), @@ -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 }) }