}
isTargetUrlValid () {
- return this.targetUrl && this.targetUrl.match(/https?:\/\//)
+ return this.targetUrl?.match(/https?:\/\//)
}
importVideo () {
const videoUpdate: VideoUpdate = {
privacy: this.highestPrivacy,
waitTranscoding: false,
- commentsEnabled: true,
- downloadEnabled: true,
channelId: this.firstStepChannelId
}
})
}
- updateSecondStep () {
- if (this.checkForm() === false) {
- return
- }
+ async updateSecondStep () {
+ if (!await this.isFormValid()) return
this.video.patch(this.form.value)