Pepper fix (#301)

* Check title is string

* Fix lint and brackets

* Add more checks
This commit is contained in:
HaveAGitGat 2022-04-25 20:29:13 +02:00 committed by GitHub
parent 764afced49
commit ba2dbf4470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,11 +71,11 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
let lang = '';
let title = 'none';
if (subStream.tags) {
if (subStream && subStream.tags && subStream.tags.language) {
lang = subStream.tags.language;
}
if (subStream.tags.title) {
if (subStream && subStream.tags && subStream.tags.title) {
title = subStream.tags.title;
}