perf(all): minify better by using arrow functions (#18730)

This commit is contained in:
Manu MA
2019-07-10 16:33:33 +02:00
committed by Brandy Carney
parent 8beeff2c52
commit 03c1d19e07
99 changed files with 653 additions and 679 deletions

View File

@ -216,7 +216,7 @@ export class Toggle implements ComponentInterface {
}
}
function shouldToggle(doc: HTMLDocument, checked: boolean, deltaX: number, margin: number): boolean {
const shouldToggle = (doc: HTMLDocument, checked: boolean, deltaX: number, margin: number): boolean => {
const isRTL = doc.dir === 'rtl';
if (checked) {
@ -226,6 +226,6 @@ function shouldToggle(doc: HTMLDocument, checked: boolean, deltaX: number, margi
return (!isRTL && (- margin < deltaX)) ||
(isRTL && (margin > deltaX));
}
}
};
let toggleIds = 0;