diff --git a/src/sql/parts/modelComponents/componentWithIconBase.ts b/src/sql/parts/modelComponents/componentWithIconBase.ts index df0d32a21b..91706c9c04 100644 --- a/src/sql/parts/modelComponents/componentWithIconBase.ts +++ b/src/sql/parts/modelComponents/componentWithIconBase.ts @@ -22,6 +22,8 @@ export class ItemDescriptor { constructor(public descriptor: IComponentDescriptor, public config: T) { } } +const ids = new IdGenerator('model-view-component-icon-'); + export abstract class ComponentWithIconBase extends ComponentBase { protected _iconClass: string; @@ -42,7 +44,6 @@ export abstract class ComponentWithIconBase extends ComponentBase { if (this.iconPath && this.iconPath !== this._iconPath) { this._iconPath = this.iconPath; if (!this._iconClass) { - const ids = new IdGenerator('model-view-component-icon-' + Math.round(Math.random() * 1000)); this._iconClass = ids.nextId(); }