mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 15:26:17 +00:00
Fixing titlecard finding
This commit is contained in:
parent
4fb7d3cc76
commit
bd5076b0e3
@ -22,7 +22,7 @@ module.exports = exports = class Files {
|
|||||||
this.assets = assets || [];
|
this.assets = assets || [];
|
||||||
|
|
||||||
this._getTitlecard = memoize(() =>
|
this._getTitlecard = memoize(() =>
|
||||||
get(find(this.files, { name: 'titlecard', dir: this.base }), [ 0, 'url' ]),
|
find(assets, { name: 'titlecard', dir: this.base })
|
||||||
);
|
);
|
||||||
|
|
||||||
this._getWebReady = memoize(() => assets && keyBy(assets.map((a) => a.webready()), 'name'));
|
this._getWebReady = memoize(() => assets && keyBy(assets.map((a) => a.webready()), 'name'));
|
||||||
@ -35,7 +35,8 @@ module.exports = exports = class Files {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get titlecard () {
|
get titlecard () {
|
||||||
return this._getTitlecard();
|
const t = this._getTitlecard();
|
||||||
|
return t && t.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
get webready () {
|
get webready () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user