From 12ac52395b9e4316e9be322e3a6fd17db3587d20 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Mon, 12 Mar 2018 09:33:37 +0200 Subject: [PATCH] Uses guard instead of if --- ChartsDemo/Swift/Demos/LineChart1ViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChartsDemo/Swift/Demos/LineChart1ViewController.swift b/ChartsDemo/Swift/Demos/LineChart1ViewController.swift index 6f34b8b763..482190aa76 100644 --- a/ChartsDemo/Swift/Demos/LineChart1ViewController.swift +++ b/ChartsDemo/Swift/Demos/LineChart1ViewController.swift @@ -99,7 +99,7 @@ class LineChart1ViewController: DemoBaseViewController { } override func updateChartData() { - if self.shouldHideData { + guard !self.shouldHideData else { chartView.data = nil return }