refactor: optimize postStateToWebview by removing unnecessary await for postMessageToWebview calls

This commit is contained in:
Daniel Riccio 2025-08-01 16:48:17 -05:00 committed by Roo Code
parent 72bdae1acb
commit b5b5b8ea63

View file

@ -1558,11 +1558,11 @@ export class ClineProvider
async postStateToWebview() {
const state = await this.getStateToPostToWebview()
await this.postMessageToWebview({ type: "state", state })
this.postMessageToWebview({ type: "state", state })
// Check MDM compliance and send user to account tab if not compliant
if (!this.checkMdmCompliance()) {
await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
this.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
}
}