Commit 54d077f9 authored by martin hou's avatar martin hou

fix: 增加对空列表的兼容处理

parent 21fbc049
......@@ -85,6 +85,8 @@ export function Home() {
}
const listFiles = async () => {
let fc = await jensen.getFileCount();
alert(fc?.count);
let files = await jensen.listFiles();
setFiles(files)
}
......
......@@ -1359,6 +1359,7 @@ Jensen.registerHandler(GET_RECORDING_FILE, (msg) => {
Jensen.registerHandler(BLUETOOTH_SCAN, (msg) => {
// console.log('bluetooth-scan', msg);
if (msg.body.length == 0) return [];
let nums = ((msg.body[0] & 0xff) << 8) | (msg.body[1] & 0xff);
let devices = [];
let decoder = new TextDecoder('UTF-8');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment