Skip to content

Commit 5579f96

Browse files
committed
chore(test): fix various test failures caused by new pkgs
1 parent 3224c05 commit 5579f96

File tree

4 files changed

+138
-133
lines changed

4 files changed

+138
-133
lines changed

.flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[ignore]
22
<PROJECT_ROOT>/node_modules/webpack-cli.*
3+
<PROJECT_ROOT>/node_modules/resolve.*
34

45
[include]
56
lib/

karma.conf.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ module.exports = function(config) {
1010
require('./webpack.config.js')({}, {}),
1111
{
1212
mode: 'development',
13-
// Remove source maps: *speeeeeed*
14-
devtool: false,
1513
cache: true,
1614
performance: {
1715
hints: false,
@@ -64,7 +62,10 @@ module.exports = function(config) {
6462

6563
autoWatch: false,
6664

67-
browsers: ['Firefox', 'ChromeHeadless'],
65+
browsers: [
66+
'Firefox',
67+
'ChromeHeadless'
68+
],
6869

6970
singleRun: true,
7071
});

lib/DraggableCore.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ export default class DraggableCore extends React.Component<DraggableCoreProps, D
387387

388388
// Snap to grid if prop has been provided
389389
if (Array.isArray(this.props.grid)) {
390-
let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;
390+
let deltaX = x - this.state.lastX || 0;
391+
let deltaY = y - this.state.lastY || 0;
391392
[deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);
392393
x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;
393394
}

0 commit comments

Comments
 (0)