mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore: fix typo with close watcher const (#29146)
The variable was spelled incorrectly.
This commit is contained in:
@@ -30,7 +30,7 @@ interface HandlerRegister {
|
||||
* moment this file is evaluated which could be
|
||||
* before the config is set.
|
||||
*/
|
||||
export const shoudUseCloseWatcher = () =>
|
||||
export const shouldUseCloseWatcher = () =>
|
||||
config.get('experimentalCloseWatcher', false) && win !== undefined && 'CloseWatcher' in win;
|
||||
|
||||
/**
|
||||
@@ -109,7 +109,7 @@ export const startHardwareBackButton = () => {
|
||||
* backbutton event otherwise we may get duplicate
|
||||
* events firing.
|
||||
*/
|
||||
if (shoudUseCloseWatcher()) {
|
||||
if (shouldUseCloseWatcher()) {
|
||||
let watcher: CloseWatcher | undefined;
|
||||
|
||||
const configureWatcher = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { doc } from '@utils/browser';
|
||||
import type { BackButtonEvent } from '@utils/hardware-back-button';
|
||||
import { shoudUseCloseWatcher } from '@utils/hardware-back-button';
|
||||
import { shouldUseCloseWatcher } from '@utils/hardware-back-button';
|
||||
|
||||
import { config } from '../global/config';
|
||||
import { getIonMode } from '../global/ionic-global';
|
||||
@@ -428,7 +428,7 @@ const connectListeners = (doc: Document) => {
|
||||
* this behavior will be handled via the ionBackButton
|
||||
* event.
|
||||
*/
|
||||
if (!shoudUseCloseWatcher()) {
|
||||
if (!shouldUseCloseWatcher()) {
|
||||
doc.addEventListener('keydown', (ev) => {
|
||||
if (ev.key === 'Escape') {
|
||||
const lastOverlay = getPresentedOverlay(doc);
|
||||
|
||||
Reference in New Issue
Block a user