File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ module Array =
6161 let inline sortInPlace < 'T , 'V when 'V : comparison > ( [<InlineIfLambda>] getKey : 'T -> 'V ) ( attrs : 'T []) : 'T [] =
6262 let N = attrs.GetLength( 0 )
6363
64- for i in [ 1 .. N - 1 ] do
64+ for i in 1 .. N - 1 do
6565 for j = i downto 1 do
6666 let key = getKey attrs[ j]
6767 let prevKey = getKey attrs[ j - 1 ]
Original file line number Diff line number Diff line change @@ -52,19 +52,22 @@ type WidgetBuilder<'msg, 'marker when 'msg: equality> =
5252 | _ -> Array.sortInPlace _. Key ( StackList.toArray & scalarAttributes)
5353
5454 WidgetAttributes =
55- match widgetAttributes with
56- | [||] -> [||]
57- | _ -> Array.sortInPlace _. Key widgetAttributes
55+ if widgetAttributes.Length > 1 then
56+ Array.sortInPlace _. Key widgetAttributes
57+ else
58+ widgetAttributes
5859
5960 WidgetCollectionAttributes =
60- match widgetCollectionAttributes with
61- | [||] -> [||]
62- | _ -> Array.sortInPlace _. Key widgetCollectionAttributes
61+ if widgetCollectionAttributes.Length > 1 then
62+ Array.sortInPlace _. Key widgetCollectionAttributes
63+ else
64+ widgetCollectionAttributes
6365
6466 EnvironmentAttributes =
65- match environmentAttributes with
66- | [||] -> [||]
67- | _ -> Array.sortInPlace _. Key environmentAttributes }
67+ if environmentAttributes.Length > 1 then
68+ Array.sortInPlace _. Key environmentAttributes
69+ else
70+ environmentAttributes }
6871
6972 [<EditorBrowsable( EditorBrowsableState.Never) >]
7073 member inline x.AddScalar ( attr : ScalarAttribute ) =
You can’t perform that action at this time.
0 commit comments