mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Prefer to use .then(void 0, ..) over .then(null, ..)
ES6 promises like using undefined as their first argument instead of null. Both should behave the same behavior
This commit is contained in:
@@ -114,7 +114,7 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
|
||||
return undefined;
|
||||
});
|
||||
});
|
||||
}).then(null, err => {
|
||||
}).then(void 0, err => {
|
||||
if (isPromiseCanceledError(err)) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
|
||||
this._validateInput = options && options.validateInput;
|
||||
|
||||
return this._proxy.$input(options, typeof this._validateInput === 'function', token)
|
||||
.then(null, err => {
|
||||
.then(void 0, err => {
|
||||
if (isPromiseCanceledError(err)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user