Skip to content

Commit

Permalink
chore: fix typo in example
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Viglucci <[email protected]>
  • Loading branch information
viglucci committed Aug 2, 2024
1 parent 16dbb6e commit 5018246
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/rsocket-examples/src/webpack/browser-bundle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ <h1>RSocket Webpack Example</h1>
var state = 'CONNECTING';
var outputDiv = document.querySelector("#output");
var _rsocket = null;
var erorrColor = '#eb4034';
var errorColor = '#eb4034';
var infoColor = '#348CEBFF';
var messageColor = '#2ccd20';

function sendMessage(message) {
if (state !== 'CONNECTED') {
const div = document.createElement("div");
div.textContent = `[${new Date().toISOString()}] not connected. cannot send messages!`;
div.style.color = erorrColor;
div.style.color = errorColor;
outputDiv.appendChild(div);
return;
}
Expand Down Expand Up @@ -61,7 +61,7 @@ <h1>RSocket Webpack Example</h1>
if (!value.length) {
const div = document.createElement("div");
div.textContent = `[${new Date().toISOString()}] please include a message!`;
div.style.color = erorrColor;
div.style.color = errorColor;
outputDiv.appendChild(div);
return;
}
Expand All @@ -85,16 +85,16 @@ <h1>RSocket Webpack Example</h1>
outputDiv.appendChild(div);
})
.catch(function (err) {
const erorrMessage = err?.message || "failed to connect to rsocket! check the console for more details.";
const errorMessage = err?.message || "failed to connect to rsocket! check the console for more details.";
if (err) {
console.error("failed to connect rsocket: " + err.message)
}
else {
console.error("failed to connect rsocket!")
}
const div = document.createElement("div");
div.textContent = `[${new Date().toISOString()}] ${erorrMessage}`;
div.style.color = erorrColor;
div.textContent = `[${new Date().toISOString()}] ${errorMessage}`;
div.style.color = errorColor;
outputDiv.appendChild(div);
});
})();
Expand Down

0 comments on commit 5018246

Please sign in to comment.