@rr0/cms 0.3.75 → 0.3.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,6 +80,7 @@ export class SourceFactory {
80
80
  * @param href
81
81
  */
82
82
  async createExternal(context, href) {
83
+ var _a, _b;
83
84
  const resOut = {};
84
85
  let title;
85
86
  let lastModif;
@@ -94,7 +95,7 @@ export class SourceFactory {
94
95
  context.error("Could not fetch source from " + href, e.message);
95
96
  title = href;
96
97
  }
97
- publisher = resOut.headers.get("host");
98
+ publisher = (_b = (_a = resOut.headers) === null || _a === void 0 ? void 0 : _a.get("host")) !== null && _b !== void 0 ? _b : new URL(href).host; // No response when the fetch failed
98
99
  const time = lastModif ? EdtfDate.fromDate(new Date(lastModif)) : context.time.date;
99
100
  const publication = { publisher, time };
100
101
  return {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@rr0/cms",
3
3
  "type": "module",
4
4
  "author": "Jérôme Beau <rr0@rr0.org> (https://rr0.org)",
5
- "version": "0.3.75",
5
+ "version": "0.3.76",
6
6
  "description": "RR0 Content Management System (CMS)",
7
7
  "exports": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",