We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61bc0d4 commit 7d1690bCopy full SHA for 7d1690b
scripts/utils.js
@@ -308,11 +308,9 @@ const getUpdateMigratedPages = (logger) => (client) => async () => {
308
const migratedPageData = yaml.load(await readFile(getMigrationPagePath(), 'utf8'));
309
310
const getDocIdList = (newDocIds) => {
311
- if (Array.isArray(newDocIds)) {
312
- return newDocIds.map((newDoc) => newDoc.slug);
313
- }
314
-
315
- return [newDocIds.slug];
+ // Ensure that doc ids always have a single leading slash.
+ const ids = Array.isArray(newDocIds) ? newDocIds : [newDocIds];
+ return ids.map((newDoc) => newDoc.slug.replace(/^\/*/, '/'));
316
};
317
318
const getCurrentMigratedIdsForPage = (pageTitle) => getGetMigratedPageIds(logger)(client)(pageTitle);
0 commit comments