Skip to content

[Bug]: defaultHasAside has different value in server and iframe which results 418 error #2011

Open
@JounQin

Description

@JounQin

Version

System:
    OS: macOS 15.3.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 303.47 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 134.0.6998.166
    Safari: 18.3.1
  npmPackages:
    @rspress/core: 1.43.9 => 1.43.9

Details

// if in iframe, default value is false
const defaultHasAside =
typeof window === 'undefined' ? true : window.top === window.self;

https://react.dev/errors/418?invariant=418

Reproduce link

N/A

Reproduce Steps

build then use html asset in iframe

Workaround

Set themeConfig#outline specifically

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions