build all packages

This commit is contained in:
Harvey committed 2021-12-03 15:10:45 +08:00
1 parent 9c5cbded93
commit a3a3f01bcc
5 files changed
+6 -5

No files matched your search

+2 -1
View File
@@ -9,6 +9,7 @@ import {
escape,
removeClass,
hasClass,
errorHandle,
} from './utils';
import Component from './utils/component';
@@ -111,7 +112,7 @@ export default class Subtitle extends Component {
return fetch(url)
.then((response) => response.arrayBuffer())
.then((buffer) => {
if (!window.TextDecoder) return;
errorHandle(window.TextDecoder, 'TextDecoder not support');
const decoder = new TextDecoder(opt.encoding || subtitle.encoding);
const text = decoder.decode(buffer);