fix: more minor errors

This commit is contained in:
ThaUnknown 2023-08-23 13:05:38 +02:00
parent 21886f2277
commit 5aad7f81e9
2 changed files with 1 additions and 3 deletions

View file

@ -95,7 +95,7 @@ export default class Parser {
parser.on('file', file => {
if (this.destroyed) return
if (file.mimetype.toLowerCase().includes('font') || file.filename.toLowerCase().endsWith('.ttf')) {
const data = Buffer.from(file.data)
const data = new Uint8Array(file.data).slice(0)
this.client.dispatch('file', { mimetype: file.mimetype, data }, [data.buffer])
}
})

View file

@ -4,10 +4,8 @@
export let page
const view = getContext('view')
const trailer = getContext('trailer')
function close () {
$view = null
$trailer = null
page = 'home'
}
</script>