From 4c3300c148a6398f7ab03fb71ad5f635268c8605 Mon Sep 17 00:00:00 2001 From: Udit Desai Date: Mon, 7 Jun 2021 16:46:24 +1000 Subject: [PATCH] Fix different typos in inline comments, deprecation warnings and variable names. (#32474) --- .../editor/src/components/local-autosave-monitor/index.js | 4 ++-- packages/editor/src/components/provider/index.js | 2 +- packages/editor/src/store/actions.js | 2 +- packages/editor/src/store/selectors.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/editor/src/components/local-autosave-monitor/index.js b/packages/editor/src/components/local-autosave-monitor/index.js index 4ecc69dc431f1..33230486750ed 100644 --- a/packages/editor/src/components/local-autosave-monitor/index.js +++ b/packages/editor/src/components/local-autosave-monitor/index.js @@ -168,7 +168,7 @@ function useAutosavePurge() { function LocalAutosaveMonitor() { const { autosave } = useDispatch( editorStore ); - const deferedAutosave = useCallback( () => { + const deferredAutosave = useCallback( () => { requestIdleCallback( () => autosave( { local: true } ) ); }, [] ); useAutosaveNotice(); @@ -185,7 +185,7 @@ function LocalAutosaveMonitor() { return ( ); } diff --git a/packages/editor/src/components/provider/index.js b/packages/editor/src/components/provider/index.js index 894596819e68a..a204aed846522 100644 --- a/packages/editor/src/components/provider/index.js +++ b/packages/editor/src/components/provider/index.js @@ -60,7 +60,7 @@ function EditorProvider( { } = useDispatch( editorStore ); const { createWarningNotice } = useDispatch( noticesStore ); - // Iniitialize and tear down the editor. + // Initialize and tear down the editor. // Ideally this should be synced on each change and not just something you do once. useLayoutEffect( () => { // Assume that we don't need to initialize in the case of an error recovery. diff --git a/packages/editor/src/store/actions.js b/packages/editor/src/store/actions.js index 64f9a6362d53a..dcd47548b09d4 100644 --- a/packages/editor/src/store/actions.js +++ b/packages/editor/src/store/actions.js @@ -169,7 +169,7 @@ export function __experimentalRequestPostUpdateFinish( options = {} ) { export function updatePost() { deprecated( "wp.data.dispatch( 'core/editor' ).updatePost", { since: '5.7', - alternative: 'User the core entitires store instead', + alternative: 'Use the core entities store instead', } ); return { type: 'DO_NOTHING', diff --git a/packages/editor/src/store/selectors.js b/packages/editor/src/store/selectors.js index aded0dbc2ae41..5f8a5492f86e2 100644 --- a/packages/editor/src/store/selectors.js +++ b/packages/editor/src/store/selectors.js @@ -772,7 +772,7 @@ export function isEditedPostDateFloating( state ) { // This should be the status of the persisted post // It shouldn't use the "edited" status otherwise it breaks the - // infered post data floating status + // inferred post data floating status // See https://github.com/WordPress/gutenberg/issues/28083 const status = getCurrentPost( state ).status; if (