From c63e65b49e644531408b6d2a2b3ef5d786c351b7 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Mon, 13 May 2024 18:09:51 +0100 Subject: [PATCH] Sorts the method and property names --- .../src/libs/context-api/debug/context-data.function.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/libs/context-api/debug/context-data.function.ts b/src/Umbraco.Web.UI.Client/src/libs/context-api/debug/context-data.function.ts index 3493f69227..a7c851380a 100644 --- a/src/Umbraco.Web.UI.Client/src/libs/context-api/debug/context-data.function.ts +++ b/src/Umbraco.Web.UI.Client/src/libs/context-api/debug/context-data.function.ts @@ -71,7 +71,7 @@ function contextItemData(contextInstance: any): UmbDebugContextItemData { } } - contextItemData = { ...contextItemData, properties: props }; + contextItemData = { ...contextItemData, properties: props.sort((a, b) => a.key.localeCompare(b.key)) }; } } else { contextItemData = { ...contextItemData, type: 'primitive', value: contextInstance }; @@ -98,7 +98,7 @@ function getClassMethodNames(klass: any) { const allMethods = typeof klass.prototype === 'undefined' ? distinctDeepFunctions(klass) : Object.getOwnPropertyNames(klass.prototype); - return allMethods.filter((name: any) => name !== 'constructor' && !name.startsWith('_')); + return allMethods.filter((name: any) => name !== 'constructor' && !name.startsWith('_')).sort(); } export interface UmbDebugContextData {