mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 01:26:18 -05:00
Lint inner function declarations to prevent Safari breakage
This commit is contained in:
parent
1c4bc154c9
commit
e5bbfe1f1b
2 changed files with 3 additions and 2 deletions
|
@ -76,6 +76,7 @@
|
|||
"no-eval": 2,
|
||||
"no-extend-native": 2,
|
||||
"no-extra-parens": 0,
|
||||
"no-inner-declarations": 2,
|
||||
"no-irregular-whitespace": 2,
|
||||
"no-iterator": 2,
|
||||
"no-loop-func": 2,
|
||||
|
|
|
@ -54,7 +54,7 @@ export default ModalBodyView.extend({
|
|||
const startTime = performance.now();
|
||||
const duration = 100;
|
||||
|
||||
function doScroll(timestamp) {
|
||||
const doScroll = function(timestamp) {
|
||||
let progress = (timestamp - startTime) / duration;
|
||||
if (progress > 1) {
|
||||
progress = 1;
|
||||
|
@ -73,7 +73,7 @@ export default ModalBodyView.extend({
|
|||
|
||||
const iprogress = 1 - progress;
|
||||
scrollParent.scrollTop(goal * progress + current * iprogress);
|
||||
}
|
||||
};
|
||||
window.requestAnimationFrame(doScroll);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue