From 0acb2847bf5cfc426804ffa7c48527d58d9b5c4a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 17 Mar 2017 23:51:03 -0700 Subject: [PATCH] Remove `toString` use from `castPath`. --- .internal/castPath.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.internal/castPath.js b/.internal/castPath.js index b3c1ad504..edba410d6 100644 --- a/.internal/castPath.js +++ b/.internal/castPath.js @@ -1,6 +1,5 @@ import isKey from './isKey.js' import stringToPath from './stringToPath.js' -import toString from '../toString.js' /** * Casts `value` to a path array if it's not one. @@ -14,7 +13,7 @@ function castPath(value, object) { if (Array.isArray(value)) { return value } - return isKey(value, object) ? [value] : stringToPath(toString(value)) + return isKey(value, object) ? [value] : stringToPath(value) } export default castPath