From 17455c2529c6dcbbee0fc21c8a89546be9472790 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 12 Feb 2018 09:10:02 +0100 Subject: [PATCH] Use toString instead of asString in asColorLike To avoid the double `typeof color === 'string'` check --- src/ol/colorlike.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/colorlike.js b/src/ol/colorlike.js index ee1cf7a59d..ede1fd0b17 100644 --- a/src/ol/colorlike.js +++ b/src/ol/colorlike.js @@ -1,7 +1,7 @@ /** * @module ol/colorlike */ -import {asString} from './color.js'; +import {toString} from './color.js'; /** @@ -13,7 +13,7 @@ export function asColorLike(color) { if (isColorLike(color)) { return /** @type {string|CanvasPattern|CanvasGradient} */ (color); } else { - return asString(/** @type {ol.Color} */ (color)); + return toString(/** @type {ol.Color} */ (color)); } }