Skip to content

When location.protocol is "data:", navigation do not work. #533

Open
@5unnyWind

Description

@5unnyWind

version: v3.7.0

If location.href is a url like "data:text/html;base64,PHNjcmlwdD4Kd2luZG93Lm9ubWVzc2FnZSA9IC..."(which is common in figma plugins development) , the value of location.origin becomes "null", causing new URL(relativePath, location.origin) to fail during construction.

This results in the error:
Uncaught TypeError: Failed to construct 'URL': Invalid base URL
at LB (:190:5457)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions