Skip to content

Commit cd49f2e

Browse files
agundermannmjackson
authored andcommitted
Fix scroll management test
1 parent c1c8eb5 commit cd49f2e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

modules/__tests__/scrollManagement-test.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ describe('Scroll management', function () {
6060
];
6161

6262
function execNextStep() {
63-
try {
64-
steps.shift().apply(this, arguments);
65-
} catch (error) {
66-
done(error);
63+
if (steps.length < 1){
64+
done();
65+
return;
6766
}
67+
68+
// Give the DOM a little time to reflect the hashchange.
69+
setTimeout(() => {
70+
steps.shift().call(this);
71+
}, 10);
6872
}
6973

7074
var history = new HashHistory({ queryKey: true });

0 commit comments

Comments
 (0)