fix room not set, fix cloudflare prerender

This commit is contained in:
2023-09-19 11:46:22 -04:00
parent a153fe3917
commit 12dd5344db
2 changed files with 6 additions and 2 deletions

View File

@@ -6,7 +6,8 @@
messageStore,
rateLimitStore,
selectedServer,
configStore
configStore,
currentRoomsStore
} from '$lib/stores';
import { Experiences } from '$lib/types';
import { getEpochFromTimestamp, getTimestampFromEpoch, updateMessages } from '$lib/utils';
@@ -67,6 +68,9 @@
}
function updateEpoch() {
if ($currentSelectedRoom === undefined) {
$currentSelectedRoom = $currentRoomsStore[0];
}
currentEpoch = Math.floor(Date.now() / $currentSelectedRoom.rateLimit!);
timeLeftInEpoch = (
($currentSelectedRoom.rateLimit! -

View File

@@ -16,7 +16,7 @@ const config = {
// See below for an explanation of these options
routes: {
include: ['/*'],
exclude: ['<all>']
exclude: ['<files>', '<prerendereed>']
}
})
}