Remove spread operator
This commit is contained in:
parent
9c9877b68a
commit
226e7cafb9
2 changed files with 2 additions and 7 deletions
|
@ -155,9 +155,9 @@ export class LanguagesRegistry extends Disposable {
|
||||||
if (Array.isArray(lang.extensions)) {
|
if (Array.isArray(lang.extensions)) {
|
||||||
if (lang.configuration) {
|
if (lang.configuration) {
|
||||||
// insert first as this appears to be the 'primary' language definition
|
// insert first as this appears to be the 'primary' language definition
|
||||||
resolvedLanguage.extensions.splice(0, 0, ...lang.extensions);
|
resolvedLanguage.extensions = lang.extensions.concat(resolvedLanguage.extensions);
|
||||||
} else {
|
} else {
|
||||||
resolvedLanguage.extensions.push(...lang.extensions);
|
resolvedLanguage.extensions = resolvedLanguage.extensions.concat(lang.extensions);
|
||||||
}
|
}
|
||||||
for (let extension of lang.extensions) {
|
for (let extension of lang.extensions) {
|
||||||
mime.registerTextMime({ id: langId, mime: primaryMime, extension: extension }, this._warnOnOverwrite);
|
mime.registerTextMime({ id: langId, mime: primaryMime, extension: extension }, this._warnOnOverwrite);
|
||||||
|
|
|
@ -245,11 +245,6 @@ suite('LanguagesRegistry', () => {
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
assert.deepEqual(registry.getExtensions('a')[0], 'aExt');
|
assert.deepEqual(registry.getExtensions('a')[0], 'aExt');
|
||||||
|
|
||||||
registry._registerLanguages([{
|
|
||||||
id: 'a',
|
|
||||||
extensions: ['aExt2']
|
|
||||||
}]);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('filenames', () => {
|
test('filenames', () => {
|
||||||
|
|
Loading…
Reference in a new issue