Lint inner function declarations to prevent Safari breakage

This commit is contained in:
Robin Ward 2016-07-14 10:22:12 -04:00
parent 1c4bc154c9
commit e5bbfe1f1b
2 changed files with 3 additions and 2 deletions

View File

@ -76,6 +76,7 @@
"no-eval": 2, "no-eval": 2,
"no-extend-native": 2, "no-extend-native": 2,
"no-extra-parens": 0, "no-extra-parens": 0,
"no-inner-declarations": 2,
"no-irregular-whitespace": 2, "no-irregular-whitespace": 2,
"no-iterator": 2, "no-iterator": 2,
"no-loop-func": 2, "no-loop-func": 2,

View File

@ -54,7 +54,7 @@ export default ModalBodyView.extend({
const startTime = performance.now(); const startTime = performance.now();
const duration = 100; const duration = 100;
function doScroll(timestamp) { const doScroll = function(timestamp) {
let progress = (timestamp - startTime) / duration; let progress = (timestamp - startTime) / duration;
if (progress > 1) { if (progress > 1) {
progress = 1; progress = 1;
@ -73,7 +73,7 @@ export default ModalBodyView.extend({
const iprogress = 1 - progress; const iprogress = 1 - progress;
scrollParent.scrollTop(goal * progress + current * iprogress); scrollParent.scrollTop(goal * progress + current * iprogress);
} };
window.requestAnimationFrame(doScroll); window.requestAnimationFrame(doScroll);
} }
} }