fix: moved useEnforcingTrailingSlash upper in the hook chain
This commit is contained in:
@@ -65,6 +65,8 @@ const useEnforcedTrailingSlash = (): void => {
|
||||
};
|
||||
|
||||
export const Reader = () => {
|
||||
useEnforcedTrailingSlash();
|
||||
|
||||
const location = useLocation();
|
||||
const { componentId, '*': path } = useParams();
|
||||
const [ref, shadowRoot] = useShadowDom(componentId, path);
|
||||
@@ -74,8 +76,6 @@ export const Reader = () => {
|
||||
).formatBaseURL();
|
||||
const state = useFetch(`${normalizedUrl}index.html`);
|
||||
|
||||
useEnforcedTrailingSlash();
|
||||
|
||||
React.useEffect(() => {
|
||||
const divElement = shadowDomRef.current;
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user