mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
perf(angular): bundle size improvements for angular (#16966)
This commit is contained in:
@ -27,16 +27,16 @@ export function startHardwareBackButton(win: Window) {
|
||||
|
||||
if (handlers.length > 0) {
|
||||
let selectedPriority = Number.MIN_SAFE_INTEGER;
|
||||
let handler: Handler | undefined;
|
||||
handlers.forEach(h => {
|
||||
if (h.priority >= selectedPriority) {
|
||||
selectedPriority = h.priority;
|
||||
handler = h.handler;
|
||||
let selectedHandler: Handler | undefined;
|
||||
handlers.forEach(({ priority, handler }) => {
|
||||
if (priority >= selectedPriority) {
|
||||
selectedPriority = priority;
|
||||
selectedHandler = handler;
|
||||
}
|
||||
});
|
||||
|
||||
busy = true;
|
||||
executeAction(handler).then(() => busy = false);
|
||||
executeAction(selectedHandler).then(() => busy = false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user