diff --git a/src/webview/JudgeView.ts b/src/webview/JudgeView.ts index d92c937..b19e129 100644 --- a/src/webview/JudgeView.ts +++ b/src/webview/JudgeView.ts @@ -208,6 +208,10 @@ class JudgeViewProvider implements vscode.WebviewViewProvider { ), ); + const remoteMessage = globalThis.remoteMessage + ? globalThis.remoteMessage.trim() + : ' '; + const html = ` @@ -228,11 +232,7 @@ class JudgeViewProvider implements vscode.WebviewViewProvider { // Since the react script takes time to load, the problem is sent to the webview before it has even loaded. // So, for the initial request, ask for it again. window.vscodeApi = acquireVsCodeApi(); - window.remoteMessage = '${ - globalThis.remoteMessage - ? globalThis.remoteMessage - : ' ' - }'; + window.remoteMessage = '${remoteMessage}'; document.addEventListener( 'DOMContentLoaded', (event) => {