Ian Ker-Seymer e4dd158b24
Fix out of bounds index access in getLabelMoment
Previously, calling getLabelMoment with an out of bound index would cause an
error such as this:

```
Uncaught TypeError: Cannot read property 'null' of undefined
```

This happens because there is not always guaranteed to be a labelMoment on
at the current datasetIndex.

One example of this is practice comes from a this function call:

```js
// since the are not always guaranteed to be at least two labelMoments
//                                \ / this index can be out of bounds
//                                 |
var tickWidth = me.getPixelForTick(1) - me.getPixelForTick(0) - 6;
```

This patch simply ensures that the `labelMoments` for the `datasetIndex` are
defined before accessing properties on it.
2016-07-26 14:45:05 -04:00
..
2015-08-30 20:17:24 -04:00
2016-05-04 21:08:59 -04:00
2015-08-29 12:31:44 -04:00
2016-04-27 21:50:31 -04:00
2016-07-09 09:22:25 -06:00