Skip to content

Commit

Permalink
Cleanup unused ts-ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed May 21, 2024
1 parent 7736ec2 commit 49037c7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/interactivity-router/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ const fetchPage = async ( url: string, { html }: { html: string } ) => {
const regionsToVdom: RegionsToVdom = async ( dom, { vdom } = {} ) => {
const regions = { body: undefined };
let head: HTMLElement[];
// @ts-ignore
if ( globalThis.IS_GUTENBERG_PLUGIN ) {
if ( navigationMode === 'fullPage' ) {
head = await fetchHeadAssets( dom, headElements );
Expand All @@ -111,7 +110,6 @@ const regionsToVdom: RegionsToVdom = async ( dom, { vdom } = {} ) => {
// Render all interactive regions contained in the given page.
const renderRegions = ( page: Page ) => {
batch( () => {
// @ts-ignore
if ( globalThis.IS_GUTENBERG_PLUGIN ) {
if ( navigationMode === 'fullPage' ) {
// Once this code is tested and more mature, the head should be updated for region based navigation as well.
Expand Down Expand Up @@ -169,7 +167,6 @@ window.addEventListener( 'popstate', async () => {
// Initialize the router and cache the initial page using the initial vDOM.
// Once this code is tested and more mature, the head should be updated for
// region based navigation as well.
// @ts-ignore
if ( globalThis.IS_GUTENBERG_PLUGIN ) {
if ( navigationMode === 'fullPage' ) {
// Cache the scripts. Has to be called before fetching the assets.
Expand Down Expand Up @@ -367,7 +364,6 @@ export const { state, actions } = store( 'core/router', {
} );

// Add click and prefetch to all links.
// @ts-ignore
if ( globalThis.IS_GUTENBERG_PLUGIN ) {
if ( navigationMode === 'fullPage' ) {
// Navigate on click.
Expand Down

0 comments on commit 49037c7

Please sign in to comment.