From cdaed61bf09f34e35da4814cdd536318eb7317e5 Mon Sep 17 00:00:00 2001 From: plainheart Date: Thu, 15 Jul 2021 18:15:21 +0800 Subject: [PATCH] fix(canvas): remove unnecessary null check. --- src/canvas/graphic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/canvas/graphic.ts b/src/canvas/graphic.ts index 41c7aa2f4..b65f494f1 100644 --- a/src/canvas/graphic.ts +++ b/src/canvas/graphic.ts @@ -30,7 +30,7 @@ function styleHasStroke(style: PathStyleProps) { function isValidStrokeFillStyle( strokeOrFill: PathStyleProps['stroke'] | PathStyleProps['fill'] ): strokeOrFill is string { - return strokeOrFill != null && strokeOrFill !== 'none' && typeof strokeOrFill === 'string'; + return typeof strokeOrFill === 'string' && strokeOrFill !== 'none'; } function styleHasFill(style: PathStyleProps) {