Creating a plugin and I want to be able to switch between pages to add frames and text to pages that are intentionally left blank. I’m starting with the cover page.
let coverPage: PageNode = figma.root.findChild(n => n.type === "PAGE" && n.name === "📔 Cover");
figma.currentPage = coverPage;
returns an error of:
Type 'PageNode | null' is not assignable to type 'PageNode'.
Type 'null' is not assignable to type 'PageNode'.
Can anyone shed some light on what I’m doing wrong?