read_file fix
All checks were successful
/ mirror_to_github (push) Successful in 32s
/ test (push) Successful in 7s

This commit is contained in:
Leon van Kammen 2025-04-08 18:01:52 +02:00
parent b7b922815b
commit 5afa537069

View file

@ -440,7 +440,7 @@ if( typeof AFRAME != 'undefined '){
this.el.addEventListener('read_file', async (e) => { this.el.addEventListener('read_file', async (e) => {
const buf = await this.term.worker.read_file( e.detail[0] ) const buf = await this.term.worker.read_file( e.detail[0] )
const str = new TextDecoder().decode(buf) const str = new TextDecoder().decode(buf)
if( typeof e.detail[1] == 'function' ) e.detail[1](str) if( typeof e.detail[1] == 'function' ) e.detail[1](str,buf)
else console.log(str) else console.log(str)
}) })
}, },