We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5910c7b commit 28ce403Copy full SHA for 28ce403
packages/edit-site/src/components/global-styles/font-sizes/font-size.js
@@ -36,7 +36,7 @@ function FontSize() {
36
37
const {
38
params: { origin, slug },
39
- goTo,
+ goBack,
40
} = useNavigator();
41
42
const [ fontSizes, setFontSizes ] = useGlobalSetting(
@@ -53,10 +53,10 @@ function FontSize() {
53
54
// Navigate to the font sizes list if the font size is not available.
55
useEffect( () => {
56
- if ( ! fontSize ) {
57
- goTo( '/typography/font-sizes/', { isBack: true } );
+ if ( !! slug && ! fontSize ) {
+ goBack();
58
}
59
- }, [ fontSize, goTo ] );
+ }, [ slug, fontSize, goBack ] );
60
61
if ( ! origin || ! slug || ! fontSize ) {
62
return null;
0 commit comments