Skip to content

Import fails if document contains a mailto link #20

@colegleason

Description

@colegleason

When importing a quip document with a mailto link, the import fails on this line:

const secret_path = href.split('.com/', 2).at(1).split('/').at(0);

The trace is:

plugin:quip:1316 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
    at Importer.process_A (plugin:quip:1316:55)
    at Importer.importHTML (plugin:quip:1345:18)
process_A @ plugin:quip:1316
importHTML @ plugin:quip:1345

Essentially the if statement is not correctly guarding against mailto links because the hostname of the URI is an empty string.

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