From 15bc0f97e630a1b1d13d0bd80096d81b9a65d7de Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 13 Sep 2024 19:22:54 -0300 Subject: data: WikiInfo.canonicalBase: don't error if null --- src/data/things/wiki-info.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/data') diff --git a/src/data/things/wiki-info.js b/src/data/things/wiki-info.js index 57446f3f..ef643681 100644 --- a/src/data/things/wiki-info.js +++ b/src/data/things/wiki-info.js @@ -61,7 +61,9 @@ export class WikiInfo extends Thing { update: {validate: isURL}, expose: { transform: (value) => - (value.endsWith('/') + (value === null + ? null + : value.endsWith('/') ? value : value + '/'), }, -- cgit 1.3.0-6-gf8a5