Skip to content

Commit f475b23

Browse files
committed
chore: fix
1 parent b10dafa commit f475b23

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/context.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ export class Context {
119119
if (payload.updates.length)
120120
this._server.ws.send(payload)
121121

122-
if (this.options.globalComponentsDeclaration)
123-
generateDeclaration(this, this.options.root, this.options.globalComponentsDeclaration)
122+
this.generateDeclaration()
124123
}
125124

126125
private updateComponentNameMap() {
@@ -207,6 +206,11 @@ export class Context {
207206
this._searched = true
208207
}
209208

209+
generateDeclaration() {
210+
if (this.options.globalComponentsDeclaration)
211+
generateDeclaration(this, this.options.root, this.options.globalComponentsDeclaration)
212+
}
213+
210214
get componentNameMap() {
211215
return this._componentNameMap
212216
}

0 commit comments

Comments
 (0)