fix: null safety

This commit is contained in:
bggRGjQaUbCoE
2024-09-06 13:57:55 +08:00
parent 2c0fb9d6bf
commit 6df8dea613

View File

@@ -1337,7 +1337,10 @@ class PlPlayerController {
if (res["data"].length == 0) { if (res["data"].length == 0) {
return; return;
} }
_vttSubtitles.value = await VideoHttp.vttSubtitles(res["data"]); var result = await VideoHttp.vttSubtitles(res["data"]);
if (result != null) {
_vttSubtitles.value = result;
}
// if (_vttSubtitles.isEmpty) { // if (_vttSubtitles.isEmpty) {
// SmartDialog.showToast('字幕均加载失败'); // SmartDialog.showToast('字幕均加载失败');
// } // }