From 7f09d202d80bb5a5302cc122194f43b890b029f5 Mon Sep 17 00:00:00 2001 From: wstaelens Date: Fri, 3 Nov 2023 15:05:17 +0100 Subject: [PATCH] Update XpsDocument.cs --- .../src/ReachFramework/Packaging/XpsDocument.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs index 2a5e571f77e..51a3befe5d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs +++ b/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs @@ -252,12 +252,7 @@ public ReadOnlyCollection Signatures // This list maintains a reference to _signatures so its enumerator will adapt // as _signatures is updated. Therefore, we need not regenerate it when _signatures // is modified. - if (_reachSignatureList == null) - { - _reachSignatureList = new ReadOnlyCollection(_reachSignatures); - } - - return _reachSignatureList; + return _reachSignatureList ??= new ReadOnlyCollection(_reachSignatures); } }