diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-28 09:57:50 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-28 09:57:50 -0300 |
commit | 168425e7a3dd3a268cfdbd2a395e11ac72eaa3b2 (patch) | |
tree | b5aa42c031cd489765d202638550f75678d298bc | |
parent | f12605331f60796da178f3d4b7bbc096f02b0d48 (diff) |
content: generateListingPage: don't mutate options in slots
-rw-r--r-- | src/content/dependencies/generateListingPage.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/content/dependencies/generateListingPage.js b/src/content/dependencies/generateListingPage.js index 4de2d006..3c50bd59 100644 --- a/src/content/dependencies/generateListingPage.js +++ b/src/content/dependencies/generateListingPage.js @@ -91,12 +91,13 @@ export default { const parts = [baseStringsKey, contextStringsKey]; - if (options.stringsKey) { + const {stringsKey, ...passOptions} = options; + + if (stringsKey) { parts.push(options.stringsKey); - delete options.stringsKey; } - return language.formatString(parts.join('.'), options); + return language.formatString(parts.join('.'), passOptions); }; return relations.layout.slots({ |