From d248060d3076cb0cb9e110dc72bff476fe6ff2b0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 9 Nov 2020 08:32:44 +0000 Subject: [PATCH] Fix alphabetical sorting of screens --- .../src/components/userInterface/ComponentsHierarchy.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index a9140e2978..1b1ddbb759 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -10,8 +10,8 @@ export let screens = [] - $: sortedScreens = screens.sort( - (s1, s2) => s1.props._instanceName > s2.props._instanceName + $: sortedScreens = screens.sort((s1, s2) => + s1.props._instanceName > s2.props._instanceName ? 1 : -1 ) /* Using a store here seems odd....