From e79a4b902546a6a7539d99520aa9501e04d7758d Mon Sep 17 00:00:00 2001 From: Robert Elliott Date: Mon, 17 Sep 2018 11:07:11 +0200 Subject: [PATCH] remove he package and rename uniqueDates to ticks --- plugins/woocommerce-admin/client/components/chart/utils.js | 2 +- plugins/woocommerce-admin/package-lock.json | 5 ----- plugins/woocommerce-admin/package.json | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/woocommerce-admin/client/components/chart/utils.js b/plugins/woocommerce-admin/client/components/chart/utils.js index bce3971f0e5..6ff9393faa9 100644 --- a/plugins/woocommerce-admin/client/components/chart/utils.js +++ b/plugins/woocommerce-admin/client/components/chart/utils.js @@ -329,7 +329,7 @@ export const drawAxis = ( node, params ) => { .tickValues( ticks ) .tickFormat( ( d, i ) => { const monthDate = d instanceof Date ? d : new Date( d ); - let prevMonth = i !== 0 ? params.uniqueDates[ i - 1 ] : params.uniqueDates[ i ]; + let prevMonth = i !== 0 ? ticks[ i - 1 ] : ticks[ i ]; prevMonth = prevMonth instanceof Date ? prevMonth : new Date( prevMonth ); return monthDate.getDate() === 1 || i === 0 || diff --git a/plugins/woocommerce-admin/package-lock.json b/plugins/woocommerce-admin/package-lock.json index 12135a3960d..3a67ca1c645 100644 --- a/plugins/woocommerce-admin/package-lock.json +++ b/plugins/woocommerce-admin/package-lock.json @@ -8190,11 +8190,6 @@ "minimalistic-assert": "^1.0.1" } }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" - }, "history": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/history/-/history-4.7.2.tgz", diff --git a/plugins/woocommerce-admin/package.json b/plugins/woocommerce-admin/package.json index 3f6f2cc362b..e13e978760f 100755 --- a/plugins/woocommerce-admin/package.json +++ b/plugins/woocommerce-admin/package.json @@ -99,7 +99,6 @@ "d3-selection": "^1.3.0", "d3-shape": "^1.2.0", "d3-time-format": "^2.1.1", - "he": "^1.1.1", "lodash": "^4.17.10", "react-dates": "^16.7.0", "react-slot-fill": "^2.0.1",