Skip to content

Commit a685b27

Browse files
committed
lint ftw!
1 parent 4132ad2 commit a685b27

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/helpers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { setTimeout } from 'requestanimationframe-timer';
22

33
export function animateScroll (id, animate) {
4-
return new Promise(((resolve, reject) => {
4+
return new Promise((resolve, reject) => {
55
const element = id ? document.getElementById(id) : document.body;
66

77
if (!element) {
@@ -23,12 +23,12 @@ export function animateScroll (id, animate) {
2323
animateFn(elapsed);
2424
}, increment);
2525
} else {
26-
return resolve();
26+
return resolve(id);
2727
}
2828
}
2929

3030
animateFn();
31-
}))
31+
});
3232
}
3333

3434
export function updateHistory (id) {

src/scrollchor.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default class Scrollchor extends React.Component {
4141
this.state.beforeAnimate(event);
4242
event && event.preventDefault();
4343
animateScroll(this.state.to, this.state.animate)
44-
.then(() => {
44+
.then((id) => {
4545
this.state.disableHistory || updateHistory(id);
4646
this.state.afterAnimate(event);
4747
});

0 commit comments

Comments
 (0)