1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Cleanup migration

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-02-24 08:14:41 -05:00
parent 4e3af1bad4
commit d125de12a0

View File

@ -16,40 +16,40 @@ const v545Beta1WeblinkStoreMigrationInjectable = getInjectable({
const weblinksRaw = store.get("weblinks"); const weblinksRaw = store.get("weblinks");
const weblinks = (Array.isArray(weblinksRaw) ? weblinksRaw : []) as WeblinkData[]; const weblinks = (Array.isArray(weblinksRaw) ? weblinksRaw : []) as WeblinkData[];
const lensWebsiteLink = weblinks.find(weblink => weblink.name === links.lensWebsiteLinkName); const lensWebsite = weblinks.find(weblink => weblink.name === links.lensWebsiteLinkName);
if (lensWebsiteLink) { if (lensWebsite) {
lensWebsiteLink.id = links.lensWebsiteWeblinkId; lensWebsite.id = links.lensWebsiteWeblinkId;
} }
const lensDocumentationWeblinkLink = weblinks.find(weblink => weblink.name === links.lensDocumentationWeblinkName); const lensDocumentationWeblink = weblinks.find(weblink => weblink.name === links.lensDocumentationWeblinkName);
if (lensDocumentationWeblinkLink) { if (lensDocumentationWeblink) {
lensDocumentationWeblinkLink.id = links.lensDocumentationWeblinkId; lensDocumentationWeblink.id = links.lensDocumentationWeblinkId;
} }
const lensSlackWeblinkLink = weblinks.find(weblink => weblink.name === links.lensForumsWeblinkName); const lensForumsWeblink = weblinks.find(weblink => weblink.name === links.lensForumsWeblinkName);
if (lensSlackWeblinkLink) { if (lensForumsWeblink) {
lensSlackWeblinkLink.id = links.lensForumsWeblinkId; lensForumsWeblink.id = links.lensForumsWeblinkId;
} }
const lensTwitterWeblinkLink = weblinks.find(weblink => weblink.name === links.lensTwitterWeblinkName); const lensTwitterWeblink = weblinks.find(weblink => weblink.name === links.lensTwitterWeblinkName);
if (lensTwitterWeblinkLink) { if (lensTwitterWeblink) {
lensTwitterWeblinkLink.id = links.lensTwitterWeblinkId; lensTwitterWeblink.id = links.lensTwitterWeblinkId;
} }
const lensBlogWeblinkLink = weblinks.find(weblink => weblink.name === links.lensBlogWeblinkName); const lensBlogWeblink = weblinks.find(weblink => weblink.name === links.lensBlogWeblinkName);
if (lensBlogWeblinkLink) { if (lensBlogWeblink) {
lensBlogWeblinkLink.id = links.lensBlogWeblinkId; lensBlogWeblink.id = links.lensBlogWeblinkId;
} }
const kubernetesDocumentationWeblinkLink = weblinks.find(weblink => weblink.name === links.kubernetesDocumentationWeblinkName); const kubernetesDocumentationWeblink = weblinks.find(weblink => weblink.name === links.kubernetesDocumentationWeblinkName);
if (kubernetesDocumentationWeblinkLink) { if (kubernetesDocumentationWeblink) {
kubernetesDocumentationWeblinkLink.id = links.kubernetesDocumentationWeblinkId; kubernetesDocumentationWeblink.id = links.kubernetesDocumentationWeblinkId;
} }
store.set("weblinks", weblinks); store.set("weblinks", weblinks);