Skip to content

Commit

Permalink
PATCH: fix: avoid taking snapshot for empty viewers
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRichel committed Nov 3, 2023
1 parent 5537da5 commit d3aac09
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/bcf-topic-form/BcfTopicForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,11 @@ export default {
const createViewpoints = () => {
Promise.all(
($viewer?.globalContext.getViewers() ?? []).map(viewer =>
viewer.getViewpoint().then(viewpoint => viewpointsToCreate.value.push(viewpoint))
)
($viewer?.globalContext.getViewers() ?? [])
.filter(viewer => viewer.getLoadedModels().length > 0)
.map(viewer =>
viewer.getViewpoint().then(viewpoint => viewpointsToCreate.value.push(viewpoint))
)
);
};
Expand Down

0 comments on commit d3aac09

Please sign in to comment.