Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the TypeScript target universal-url doesn't work in React Native #23

Open
zbrox opened this issue Aug 30, 2018 · 0 comments
Open

In the TypeScript target universal-url doesn't work in React Native #23

zbrox opened this issue Aug 30, 2018 · 0 comments
Assignees
Labels
bug Something isn't working TypeScript Issues relating specifically to the TypeScript target

Comments

@zbrox
Copy link
Contributor

zbrox commented Aug 30, 2018

Previous versions just had a simple shim for the URL object, something like:

function URL(relative: string, base:string) {
    const baseUrl = base.replace(/\/+$/, "")
    const relativeUrl = relative.replace(/^\/+/, "")

    this.toString = function toString() {
        return `${baseUrl}/${relativeUrl}`
    }
}
@zbrox zbrox added the bug Something isn't working label Mar 13, 2019
@zbrox zbrox added the TypeScript Issues relating specifically to the TypeScript target label Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working TypeScript Issues relating specifically to the TypeScript target
Projects
None yet
Development

No branches or pull requests

2 participants