Skip to content

Commit df2aeae

Browse files
committed
1 parent 0fca01c commit df2aeae

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/vs/editor/browser/services/openerService.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { URI } from 'vs/base/common/uri';
1111
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
1212
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
1313
import { IOpenerService } from 'vs/platform/opener/common/opener';
14+
import { equalsIgnoreCase } from 'vs/base/common/strings';
1415

1516
export class OpenerService implements IOpenerService {
1617

@@ -30,13 +31,14 @@ export class OpenerService implements IOpenerService {
3031
if (!scheme) {
3132
// no scheme ?!?
3233
return Promise.resolve(false);
34+
}
3335

34-
} else if (scheme === Schemas.http || scheme === Schemas.https || scheme === Schemas.mailto) {
36+
if (equalsIgnoreCase(scheme, Schemas.http) || equalsIgnoreCase(scheme, Schemas.https) || equalsIgnoreCase(scheme, Schemas.mailto)) {
3537
// open http or default mail application
3638
dom.windowOpenNoOpener(resource.toString(true));
3739
return Promise.resolve(true);
3840

39-
} else if (scheme === Schemas.command) {
41+
} else if (equalsIgnoreCase(scheme, Schemas.command)) {
4042
// run command or bail out if command isn't known
4143
if (!CommandsRegistry.getCommand(path)) {
4244
return Promise.reject(`command '${path}' NOT known`);

0 commit comments

Comments
 (0)