Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
fix: show layers in storytelling without names (#45)
Browse files Browse the repository at this point in the history
* band-aid fix to still show layers in storytelling without names

* Update src/components/molecules/Common/plugin/builtin/widgets/storytelling.tsx

Co-authored-by: rot1024 <[email protected]>

Co-authored-by: KaWaite <[email protected]>
Co-authored-by: rot1024 <[email protected]>
  • Loading branch information
3 people authored Jul 16, 2021
1 parent 129ae36 commit 00ae3c6
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,10 @@ const Storytelling: WidgetComponent<Property, PluginProperty> = ({ property }) =
property?.stories
?.map(story => {
const title = layers.find(l => l?.id === story.layer)?.title;
if (title) {
return {
...story,
title,
};
}
return undefined;
return {
...story,
title: title || story.title,
};
})
.filter((s): s is Story => !!s)
);
Expand Down

0 comments on commit 00ae3c6

Please sign in to comment.