diff --git a/plugins/woocommerce-admin/client/components/chart/utils.js b/plugins/woocommerce-admin/client/components/chart/utils.js index 1c2ae15612e..fbaee8da841 100644 --- a/plugins/woocommerce-admin/client/components/chart/utils.js +++ b/plugins/woocommerce-admin/client/components/chart/utils.js @@ -357,12 +357,9 @@ export const getDateSpaces = ( data, uniqueDates, width, xLineScale ) => }; } ); -export const compareStrings = ( s1, s2, params, splitChar ) => { - splitChar = typeof splitChar === 'undefined' ? ' ' : splitChar; - let string1 = new Array(); - let string2 = new Array(); - string1 = s1.split( splitChar ); - string2 = s2.split( splitChar ); +export const compareStrings = ( s1, s2, splitChar = ' ' ) => { + const string1 = s1.split( splitChar ); + const string2 = s2.split( splitChar ); const diff = new Array(); const long = s1.length > s2.length ? string1 : string2; for ( let x = 0; x < long.length; x++ ) {