Skip to content

Commit

Permalink
Fix problem on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrawal-d committed Jul 31, 2024
1 parent edfedf4 commit 6397751
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/webview/JudgeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ class JudgeViewProvider implements vscode.WebviewViewProvider {
),
);

const remoteMessage = globalThis.remoteMessage
? globalThis.remoteMessage.trim()
: ' ';

const html = `
<!DOCTYPE html lang="EN">
<html>
Expand All @@ -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) => {
Expand Down

0 comments on commit 6397751

Please sign in to comment.