From 88a2f3070ce7a3ff5991db2d4588365049e6b4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E8=AF=97=E9=9B=85?= Date: Mon, 23 Mar 2020 15:11:06 +0800 Subject: [PATCH] =?UTF-8?q?!853=20=E4=BF=AE=E5=A4=8D:=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=9C=AA=E5=87=BA=E7=8E=B0=E6=97=B6=E6=89=A7?= =?UTF-8?q?=E8=A1=8CTOGGLESYNCDATA=E5=AF=BC=E8=87=B4=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/ToolBar/ToolbarContainer.tsx | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/UI/Components/ToolBar/ToolbarContainer.tsx b/src/UI/Components/ToolBar/ToolbarContainer.tsx index 3118780c4..afbb31c67 100644 --- a/src/UI/Components/ToolBar/ToolbarContainer.tsx +++ b/src/UI/Components/ToolBar/ToolbarContainer.tsx @@ -49,16 +49,17 @@ export class ToolbarContainer extends React.Component<{}, {}> { if (cmdName === "TOGGLESYNCDATA") { let icon = this.iconList.find(icon => icon?.command === "TOGGLESYNCDATA"); - if (app.SyncDataReactor.Enable) - { - icon.svg = IconEnum.Synchronizing; - icon.title = "同步中"; - } - else - { - icon.svg = IconEnum.Synchronous; - icon.title = "未同步"; - } + if (icon) + if (app.SyncDataReactor.Enable) + { + icon.svg = IconEnum.Synchronizing; + icon.title = "同步中"; + } + else + { + icon.svg = IconEnum.Synchronous; + icon.title = "未同步"; + } } }); }