From e323a841dcc923238df570f116f83c3523a2da44 Mon Sep 17 00:00:00 2001 From: Lars Berger Date: Tue, 19 Mar 2024 00:15:51 +0800 Subject: [PATCH] feat: add null check to `defaultInterface` in sample config --- packages/desktop/resources/sample-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/desktop/resources/sample-config.yaml b/packages/desktop/resources/sample-config.yaml index 45b8bd43..5934a70c 100644 --- a/packages/desktop/resources/sample-config.yaml +++ b/packages/desktop/resources/sample-config.yaml @@ -109,9 +109,9 @@ window/bar: providers: ['network'] template: | - @if (network.defaultInterface.type === 'ethernet') { + @if (network.defaultInterface?.type === 'ethernet') { - } @else if (network.defaultInterface.type === 'wifi') { + } @else if (network.defaultInterface?.type === 'wifi') { @if (network.defaultGateway?.signalStrength >= 80) { } @else if (network.defaultGateway?.signalStrength >= 65) { } @else if (network.defaultGateway?.signalStrength >= 40) { }