Skip to content

Commit

Permalink
update to pass test case
Browse files Browse the repository at this point in the history
  • Loading branch information
robinhoodie0823 committed Jan 10, 2024
1 parent c1b0204 commit 3fbd4d7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/AsyncMessageChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ export class AsyncMessageChannel {
const { activeTheme, themes } = msg.message;
const themeToFind = Object.values(activeTheme)[0];
const activeMode = themes.find((theme) => theme.id === themeToFind);
figma.currentPage.children.forEach((frame) => {
frame.setExplicitVariableModeForCollection(activeMode?.$figmaCollectionId ?? '', activeMode?.$figmaModeId ?? '');
});
if (figma.currentPage.children && figma.currentPage.children.length > 0) {
figma.currentPage.children.forEach((frame) => {
frame.setExplicitVariableModeForCollection(activeMode?.$figmaCollectionId ?? '', activeMode?.$figmaModeId ?? '');
});
}
}
}
resolve(msg.message);
Expand Down

0 comments on commit 3fbd4d7

Please sign in to comment.