Add more valid

This commit is contained in:
Harvey committed 2021-12-10 11:05:44 +08:00
1 parent 5f45ad112f
commit d919471838
7 files changed
+31 -11

No files matched your search

+3
View File
@@ -12,6 +12,8 @@ import {
errorHandle,
} from './utils';
import Component from './utils/component';
import validator from 'option-validator';
import scheme from './scheme';
export default class Subtitle extends Component {
constructor(art) {
@@ -86,6 +88,7 @@ export default class Subtitle extends Component {
}
init(subtitleOption) {
validator(subtitleOption, scheme.subtitle);
if (!subtitleOption.url) return;
const {