From eaf6a4654f1aa8771085d8791ce04021f0ce4839 Mon Sep 17 00:00:00 2001 From: NicolasRichel Date: Fri, 22 Jul 2022 11:18:31 +0200 Subject: [PATCH] PATCH: fix(form): make sure image viewpoints are always comes last --- src/components/bcf-topic-form/BcfTopicForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/bcf-topic-form/BcfTopicForm.vue b/src/components/bcf-topic-form/BcfTopicForm.vue index 8775d24..aac2af9 100644 --- a/src/components/bcf-topic-form/BcfTopicForm.vue +++ b/src/components/bcf-topic-form/BcfTopicForm.vue @@ -388,7 +388,7 @@ export default { if (viewpointsToUpdate.value.length === 0) { // If topic has no viewpoints yet make sure 3D viewpoints // comes first in the list of viewpoints to create. - viewpointsToCreate.value.sort((v1, v2) => v1.order - v2.order); + viewpointsToCreate.value.sort((v1, v2) => (v1.order ?? Infinity) - (v2.order ?? Infinity)); } if (props.bcfTopicObjects) {