Skip to content

Commit fe13dd1

Browse files
committed
undefined options, fix test
1 parent 73a0b54 commit fe13dd1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/core.datasetController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,8 @@ export default class DatasetController {
808808
options = config.createResolver(scopes, context);
809809
}
810810
const animations = new Animations(chart, options && options[mode] || options);
811-
if (options._cacheable) {
812-
cache[cacheKey] = animations && Object.freeze(animations);
811+
if (options && options._cacheable) {
812+
cache[cacheKey] = Object.freeze(animations);
813813
}
814814
return animations;
815815
}

test/specs/core.animations.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Chart.animations', function() {
1111
}
1212
});
1313
expect(anims._properties.get('property1')).toEqual(jasmine.objectContaining({duration: 1000}));
14-
expect(anims._properties.get('property2')).toEqual({duration: 2000});
14+
expect(anims._properties.get('property2')).toEqual(jasmine.objectContaining({duration: 2000}));
1515
});
1616

1717
it('should ignore duplicate definitions from collections', function() {

0 commit comments

Comments
 (0)