mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
perf(all): minify better by using arrow functions (#18730)
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user