mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
This reverts commit 22a427f934.
This commit is contained in:
@@ -5,8 +5,7 @@
|
||||
|
||||
import { IModelStore, IComponentDescriptor, IComponent } from './interfaces';
|
||||
import { Deferred } from 'sql/base/common/promise';
|
||||
import { entries } from 'sql/base/common/collections';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
import { entries } from 'sql/base/common/objects';
|
||||
|
||||
class ComponentDescriptor implements IComponentDescriptor {
|
||||
constructor(public readonly id: string, public readonly type: string) {
|
||||
@@ -66,7 +65,7 @@ export class ModelStore implements IModelStore {
|
||||
}
|
||||
|
||||
validate(component: IComponent): Thenable<boolean> {
|
||||
let componentId = find(entries(this._componentMappings), ([id, mappedComponent]) => component === mappedComponent)[0];
|
||||
let componentId = entries(this._componentMappings).find(([id, mappedComponent]) => component === mappedComponent)[0];
|
||||
return Promise.all(this._validationCallbacks.map(callback => callback(componentId))).then(validations => validations.every(validation => validation === true));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user