[🐛] Fixed apps not loading again...

This commit is contained in:
ThinLiquid 2024-01-10 14:08:20 +00:00
parent 3aa3eb9741
commit e4f1c22900
No known key found for this signature in database
GPG key ID: D5085759953E6CAA

View file

@ -31,7 +31,7 @@ class Flow {
window.fs.promises.readdir('/Applications').then((list) => { window.fs.promises.readdir('/Applications').then((list) => {
list.forEach((file) => { list.forEach((file) => {
window.fs.promises.readFile('/Applications/' + file).then(content => { window.fs.promises.readFile('/Applications/' + file).then(content => {
if (!file.endsWith('.js') || !file.endsWith('.mjs')) return if (!file.endsWith('.js') && !file.endsWith('.mjs')) return
if (content.toString() === '') return if (content.toString() === '') return
this.appList.push(`data:text/javascript;base64,${btoa(content.toString())}`) this.appList.push(`data:text/javascript;base64,${btoa(content.toString())}`)
}).catch((e) => console.error(e)) }).catch((e) => console.error(e))