mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
[DevFilesPreview]Fix not created settings crash (#17541)
This commit is contained in:
@@ -22,7 +22,19 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Wrap
|
public bool Wrap
|
||||||
{
|
{
|
||||||
get => moduleSettings.GetSettings<PowerPreviewSettings>(PowerPreviewSettings.ModuleName).Properties.EnableMonacoPreviewWordWrap;
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return moduleSettings.GetSettings<PowerPreviewSettings>(PowerPreviewSettings.ModuleName).Properties.EnableMonacoPreviewWordWrap;
|
||||||
|
}
|
||||||
|
catch (FileNotFoundException)
|
||||||
|
{
|
||||||
|
// Couldn't read the settings.
|
||||||
|
// Assume default of true.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user