Compare commits
No commits in common. "1038602d5b066ad64fcae3c2c3d156725c085f34" and "d5a67c919873454a3672f7dd0cf5e2b723cbaf89" have entirely different histories.
1038602d5b
...
d5a67c9198
@ -32,11 +32,6 @@
|
||||
let DisplayComments: Comment[];
|
||||
let commentPage = 0;
|
||||
let pageSize = 10;
|
||||
|
||||
const escapeHtml = (unsafe) => {
|
||||
return unsafe.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
||||
}
|
||||
|
||||
async function onSubmit(event: SubmitEvent) {
|
||||
// Validation
|
||||
if (name === '' || message === '') {
|
||||
@ -91,7 +86,7 @@
|
||||
// Check if in localstorage already
|
||||
let commentLS = localStorage.getItem('comments');
|
||||
let comments: Comment[];
|
||||
if (commentLS == null) {
|
||||
if (commentLS === null) {
|
||||
// Not yet in storage
|
||||
comments = await updateComments();
|
||||
DisplayComments = comments;
|
||||
@ -104,7 +99,7 @@
|
||||
return t;
|
||||
});
|
||||
let oldHash = localStorage.getItem('commenthash');
|
||||
if (oldHash?.trim() !== newHash.trim()) {
|
||||
if (oldHash != newHash) {
|
||||
DisplayComments = await updateComments();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user