victory-pie 31.1.0 → 31.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import _isNil from "lodash/isNil";
1
2
  import _isPlainObject from "lodash/isPlainObject";
2
3
  import _isFunction from "lodash/isFunction";
3
4
  import _defaults from "lodash/defaults";
@@ -212,7 +213,7 @@ export var getBaseProps = function (props, fallbackProps) {
212
213
  padAngle: Helpers.radiansToDegrees(slice.padAngle)
213
214
  });
214
215
 
215
- var eventKey = datum.eventKey || index;
216
+ var eventKey = !_isNil(datum.eventKey) ? datum.eventKey : index;
216
217
  var dataProps = {
217
218
  index: index,
218
219
  slice: slice,
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getBaseProps = void 0;
7
7
 
8
+ var _isNil2 = _interopRequireDefault(require("lodash/isNil"));
9
+
8
10
  var _isPlainObject2 = _interopRequireDefault(require("lodash/isPlainObject"));
9
11
 
10
12
  var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
@@ -234,7 +236,7 @@ var getBaseProps = function (props, fallbackProps) {
234
236
  endAngle: _victoryCore.Helpers.radiansToDegrees(slice.endAngle),
235
237
  padAngle: _victoryCore.Helpers.radiansToDegrees(slice.padAngle)
236
238
  });
237
- var eventKey = datum.eventKey || index;
239
+ var eventKey = !(0, _isNil2.default)(datum.eventKey) ? datum.eventKey : index;
238
240
  var dataProps = {
239
241
  index: index,
240
242
  slice: slice,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-pie",
3
- "version": "31.1.0",
3
+ "version": "31.2.0",
4
4
  "description": "Pie Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -22,7 +22,7 @@
22
22
  "d3-shape": "^1.0.0",
23
23
  "lodash": "^4.17.5",
24
24
  "prop-types": "^15.5.8",
25
- "victory-core": "^31.1.0"
25
+ "victory-core": "^31.2.0"
26
26
  },
27
27
  "scripts": {
28
28
  "version": "nps build-libs && nps build-dists"
@@ -1,5 +1,5 @@
1
1
  /*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 45, 135, 180, 225, 315] }]*/
2
- import { assign, defaults, isFunction, isPlainObject } from "lodash";
2
+ import { assign, defaults, isFunction, isPlainObject, isNil } from "lodash";
3
3
  import * as d3Shape from "d3-shape";
4
4
 
5
5
  import { Helpers, Data, Style } from "victory-core";
@@ -189,7 +189,7 @@ export const getBaseProps = (props, fallbackProps) => {
189
189
  endAngle: Helpers.radiansToDegrees(slice.endAngle),
190
190
  padAngle: Helpers.radiansToDegrees(slice.padAngle)
191
191
  });
192
- const eventKey = datum.eventKey || index;
192
+ const eventKey = !isNil(datum.eventKey) ? datum.eventKey : index;
193
193
  const dataProps = {
194
194
  index,
195
195
  slice,