Fix hashing
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
75f3777b46
commit
1038602d5b
|
@ -32,6 +32,11 @@
|
|||
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 === '') {
|
||||
|
@ -86,7 +91,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;
|
||||
|
@ -99,7 +104,7 @@
|
|||
return t;
|
||||
});
|
||||
let oldHash = localStorage.getItem('commenthash');
|
||||
if (oldHash != newHash) {
|
||||
if (oldHash?.trim() !== newHash.trim()) {
|
||||
DisplayComments = await updateComments();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue