Skip to content

Commit b661e3e

Browse files
committed
fix reinitialization of big number webview
1 parent 139a774 commit b661e3e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/notebooks/deepnote/bigNumberComparisonSettingsWebview.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,12 @@ export class BigNumberComparisonSettingsWebviewProvider {
118118
this.disposables
119119
);
120120

121-
// Send initial data
122-
await this.sendLocStrings();
123-
await this.sendInitialData();
121+
// Send initial data after a small delay to ensure webview is ready
122+
// This is necessary because postMessage can fail if sent before the webview is fully loaded
123+
setTimeout(async () => {
124+
await this.sendLocStrings();
125+
await this.sendInitialData();
126+
}, 100);
124127

125128
// Return a promise that resolves when the user saves or cancels
126129
return new Promise((resolve) => {

0 commit comments

Comments
 (0)