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

Allow fallback to be true #14

Merged
merged 1 commit into from
Dec 18, 2019
Merged

Allow fallback to be true #14

merged 1 commit into from
Dec 18, 2019

Conversation

colinking
Copy link
Contributor

This is a follow-up PR to: #13

In that PR, fallback could only be a function or false. If it was set to true, it would produce an error because it would attempt to execute it as if it was a function:

  Error thrown in test:

  TypeError {
    message: 'options.fallback is not a function',
  }

This means that upstream consumers would need to replace fallback=true with fallback=undefined, which isn't a great experience.

This PR just updates terminal-link to produce the default fallback if fallback=true, and updates the associated documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants