Simplify with ||
This commit is contained in:
@@ -63,10 +63,7 @@ export class WebLinksAddon implements ITerminalAddon {
|
|||||||
|
|
||||||
if (this._useLinkProvider && 'registerLinkProvider' in this._terminal) {
|
if (this._useLinkProvider && 'registerLinkProvider' in this._terminal) {
|
||||||
const options = this._options as ILinkProviderOptions;
|
const options = this._options as ILinkProviderOptions;
|
||||||
let regex = strictUrlRegex;
|
const regex = options.urlRegex || strictUrlRegex;
|
||||||
if (options.urlRegex) {
|
|
||||||
regex = options.urlRegex;
|
|
||||||
}
|
|
||||||
this._linkProvider = this._terminal.registerLinkProvider(new WebLinkProvider(this._terminal, regex, this._handler, options));
|
this._linkProvider = this._terminal.registerLinkProvider(new WebLinkProvider(this._terminal, regex, this._handler, options));
|
||||||
} else {
|
} else {
|
||||||
// TODO: This should be removed eventually
|
// TODO: This should be removed eventually
|
||||||
|
|||||||
Reference in New Issue
Block a user